Hello Community!
I did this input with autocomplete, but I have some problem because whenever I clear the contents of the input, the on-change event of the input is not triggered and allows behavior that I don´t wish according to my business rules. How can I do to run the Onchange again and fix this behavior?
Because isn´t supposed to allow creating a loan without student selected.
I attached the oml.
Best regards,
Jessica Marques.
Hi Jessica,
Replace the first IF node of the SaveRequest screen action with the below condition
Trim(Student_Search) = "" or StudentId = NullIdentifier()
Hope this helps you!
Regards,
Benjith Sam
Benjith Sam wrote:
thanks for the help, now it works!
I know that the function Trim is for removes space characters, but I didn´t really understand how it works for this case... Can you explain to me?
Hello Jessica.
There are probably overlapping functions on the javascript OnChange (check here the same issue) because of AutoComplete and your definition of On Change.
Like Benjith said, you must do an extra validation before saving. Imagine the user edited the field value by playing with debug. Your event can't detect that so the invalid information would pass.
Nuno Reis wrote:
Hi,
thanks for the indication, I had read this post but I couldn't find an alternative to help me.
Jessica.
Hi!
Another solution can be , not use the
OnSearchStudentChange
action and use the
Input_AutoComplete_GetIdentifier
in the
SaveRequest
action , as I did in the application attached.
Hope this helps.
Regards
Graça
Maria da Graça Peixoto wrote:
Hi Graça,
Thank you for this idea.
I did as you said with "student", and with "book" too.
Best Regards,