Upload Attachment(uploadFileFromBrowser) in menu not working

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

mkushwaha
Ebase User
Posts: 29
Joined: Mon Nov 02, 2015 7:19 pm

Upload Attachment(uploadFileFromBrowser) in menu not working

#1

Postby mkushwaha » Thu Feb 04, 2016 8:29 pm

I have a menu component and on one of the menu item, I have a script on Override On Click events

In the component's field resource mapping, I have a database resource mapped to a field variable to get the query result.

In the script when I call the database resource, it give me error and it says "com.ebasetech.xi.exceptions.FormRuntimeException: Field QRY of resource REHAB_REFERRAL_LATEST is required but has no value"

even though I have mapped it to field variable in field resource mapping.

My script looks like this:

Code: Select all

	var ptID = client.getFormSession().getFormSessionAttribute("PT_ID");
	log("Patient " + ptID);
	fields.PT_ID.value = ptID;
	resources.REHAB_REFERRAL_LATEST.fetch();
	log("Referral " + fields.REFERRAL_ID.value);
The script stops just before the fetch!

My QRY variable is mapped to PT_ID in field resource mapping of the menu component.

I don't think I am missing anything. Could you guide me to appropriate solution ?

Thanks in advance!
0 x

kotinkarwak
Ebase User
Posts: 109
Joined: Mon Sep 21, 2015 9:55 pm

#2

Postby kotinkarwak » Fri Feb 05, 2016 6:59 am

Try full path for the field

Form.fields.PT_ID.value = ptID;
0 x
ebasetech v5

Skype: mateso08
Location: Kenya

mkushwaha
Ebase User
Posts: 29
Joined: Mon Nov 02, 2015 7:19 pm

#3

Postby mkushwaha » Fri Feb 05, 2016 2:38 pm

I tried this and get following error:

com.ebasetech.ufs.runtime.events.rhinojavascript.JavascriptExecutionHandler$RhinoScriptException: TypeError: Cannot set property "value" of undefined to "282491" (REHAB_PT_ATT_UPLOAD_GLOBAL#32)

I think there is no form associated. the script is directly attached to override on click event.
0 x

Steve James
Ebase User
Posts: 331
Joined: Mon Mar 10, 2014 8:34 am

#4

Postby Steve James » Fri Feb 05, 2016 3:35 pm

0 x

mkushwaha
Ebase User
Posts: 29
Joined: Mon Nov 02, 2015 7:19 pm

#5

Postby mkushwaha » Mon Feb 08, 2016 4:26 pm

Steve, I don't see anything in your code section ?
0 x


Who is online

Users browsing this forum: Bing [Bot] and 8 guests