Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!
The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.
I'm trying to conditionally autofill a text field based on two other text fields above it. I've gotten the value in the text field to display correctly however the value doesn't save into the variable set in the "saveInto" property. I've tried changing the "refreshAfter" property and using local variables with the "a!refreshVariable" function with both the "refreshOnVarChange" and "refreshAlways" options. I've also tried the "a!save" function both inside and outside of the if statement.
Does anyone have any suggestions on how I could do this or know where my problem is? I'm pretty new to Appian so I may be going about this completely wrong.
a!textField( local!SealModel: a!refreshVariable(refreshAlways: true() /*refreshOnVarChange: {*/ /*local!SealManuf,*/ /*local!SealPartNum,*/ /*local!SealModel*/ /*}*/ ), label: "Seal Model/Type:", labelPosition: "ABOVE", value: if( and( local!SealManuf = "XYZ", not(isnull(local!SealPartNum)) ), mid(local!SealPartNum, 8, 3), local!SealModel ), /*a!save(local!SealModel, mid(local!SealPartNum, 8, 3)),*/ saveInto: local!SealModel, refreshAfter: "UNFOCUS", /*disabled: if(and(ri!SealManuf = "XYZ", not(isnull(ri!SealPartNum))),*/ /*true(), false()),*/ validations: {} ),
Discussion posts and replies are publicly visible
Hi Jack, note an input field will only call it's saveInto parameter if it is interacted with by the user (this is where all of your a!save's must reside). If you are using this field for display only it will not update any values itself, due to no user interaction.
Typical designs in this scenario include utilizing the saveInto on your editable text fields above to also populate this third variable, or utilizing saveInto within the submit button, so the local! value can be persisted out when the form is being exited. For example, the Submit button would mimic the logic in your read-only text field as:
a!buttonWidget( label: "Submit", value: false, saveInto: { ri!cancel, a!save( ri!whereYouWantYourDataToGo, if( and( local!SealManuf = "XYZ", not(isnull(local!SealPartNum)) ), mid(local!SealPartNum, 8, 3), local!SealModel ) ) } )
I used the saveInto on an above text field and that worked perfectly. Thank you!
Great!