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);
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!