Hi!
In the Appian Designer, we have interfaces with text fields that save into rule inputs or local variables.
When entering in data into each of these text fields, the data is only sometimes saved in the rule inputs or the local variables.
Why is the user input not saving all of the time?
Has anyone encountered this issue before?
Below is an example with four text fields. Text1 and Text2 save into rule inputs ri!text1 and ri!text2 both of type text. Text3 and Text4 save into local!text3 and local!text4. User input is not saved every time the value changes.
a!localVariables( local!text3, local!text4, { a!textField( label: "Text1", labelPosition: "ABOVE", value: ri!text1, saveInto: {ri!text1}, refreshAfter: "UNFOCUS", validations: {} ), a!textField( label: "Text2", labelPosition: "ABOVE", value: ri!text2, saveInto: {ri!text2}, refreshAfter: "UNFOCUS", validations: {} ), a!textField( label: "Text3", labelPosition: "ABOVE", value: local!text3, saveInto: {local!text3}, refreshAfter: "UNFOCUS", validations: {} ), a!textField( label: "Text4", labelPosition: "ABOVE", value: local!text4, saveInto: {local!text4}, refreshAfter: "UNFOCUS", validations: {} ) } )
Discussion posts and replies are publicly visible
Hello AshleyS ,
Your code works fine and there seems to be no issue. From what I understand, you are expecting the value to get updated when the user is typing or entering the value into the input field. The value gets updated only when the user clicks outside the input field after entering the value or after a keypress if defined in the refreshAfter parameter of the input field.
If the above is not the concern, please elaborate your requirement in detail.
Hi Konduru Chaitanya,
Yes, I do expect the value to get updated when the user is typing or entering the value into the input field. When clicking in the input field and into the next one it doesn't always save the user input. The same happens when clicking on an input and tabbing to the next.
For example. If I click on Text1 and enter in "one", click or tab into Text2 and enter "two", then click/tab into Text3. Text1 saves "one" into ri!text1 but Text2 doesn't save "two" into ri!text2.
AshleyS said: I do expect the value to get updated when the user is typing or entering the value into the input field
AFAIK, this will not happen.
AshleyS said:When clicking in the input field and into the next one it doesn't always save the user input
In your current expression, it is not happening in this way. It works fine. Could you please share the rule input data type that you have configured.
Hi AshleyS ,I have used your code to check the issue by implementing the flow, and it is working fine for me. You mentioned that you created ruleInput as a text datatype. Can you please recheck and confirm whether you have mapped it to the correct variables in the userInput task? Because there is no issue with your code.
ruleInput
Hi gayatria0439,
I did create two rule inputs ri!text1 and ri!text2. I rechecked and they are both correctly set to type text. This is a stand alone interface so it is not mapped to a process model's userInput task. I checked other interfaces encountering this problem, and their datatypes are set and are mapped properly to userInput tasks. This issue is also happening for local variables text3 and text4 as well as the rule inputs text1 and text2.
I tried my above code in the Appian Community addition which is running Appian Version 25.1. In this version I did see the code working as expected. Clicking or tabbing through each text field kept every user value as expected. However, in the version I'm using 24.2.392.0, it is not keeping user values when clicking or when tabbing through the text fields. Could this issue be due to a difference in versions?
Additionally, we're seeing a warning in the Dev Console (F12 in browser) stating: Component with cId: xyz tried to issue a reevaluation request while unfocused.
Hi AshleyS If you are using array in save Into please try with a!save(ri!text2,save!value)
To save the value of your textboxes when you are still typing, you can use "KEYPRESS" in refreshAfter parameter instead of "UNFOCUS".
In 15 years, I have never seen such behaviour. I suggest to open a support case with Appian.