I have created a form interface that is intended for a user to type in or scan in a barcode number. The interface should then query the connected external database, and automatically populate the remaining form fields with the barcode number's data record.
The user will then type in any extra comments he may have and attach any photos if he desires. Once the form is completely filled out, the user clicks the "Submit Record" which will then save the data record into a local datastore entity.
I posted my first question last week and was advised to use a query entity. The problem I'm facing now is that once the barcode is typed into the barcode field, the remaining fields are not auto populating as intended. And SAIL doesn't show any errors, just nothing happens.
Can someone please take a look at my interface definition and see what I could be doing wrong. Thanks!
PDF
Discussion posts and replies are publicly visible
Hi Pauly,
Can you please check rule input variable "ri!addanomalyRecord", is It stored any values after enter values in barcode field.
Regards,
Bhanu
Hi Bhanu,
I typed in a known barcode from the external database, and the only value that is being stored in rule input variable "ri!addanomalyRecord" is the barcode number which is named "object_name" in the rule input. Screenshot posted below:
FYI....the rule input "getTireRecord" is for the data store entity mapped to the external database. And the rule input "addanomalyRecord" is for the data store entity mapped to the local database. Just wanted to clear that up so we're on the same train of thought.
Hi Paul,
see, ri!getTiredRecord value is null, in your code, you place the condition
if(isnull(ri!getTiredRecord.object_name),{},then execute the query...…())
remove the that condition, and check your code.
It will work
Bhanu.