saveInto is not working ?

Hi ,

saveInto is not working for the below code

a!paragraphField(
label: "Comment",
value: ri!comments,
instructions: "(" & 255 - len(ri!comments) & ")",
saveInto: a!save(ri!comments, save!value),
refreshAfter: "KEYPRESS",
validations: rule!PDR_validateTextOnSize(enteredText: ri!comments, size: 255),
required: true(),
readOnly: false()
)

when I write anything in paragraph field the value is not save.

  Discussion posts and replies are publicly visible

Parents Reply Children
  • Hah!! Ok, context is everything!!! That's a key piece of information that we needed to address this (just for future reference!)

    So, firstly, some concepts that will help you understand how this all hangs together so you'll be better placed to solve this yourself in the future:

    1. In User Interface and Expression Rule objects, Rule Inputs are pointers to variables, and not variables in their own right. That is, you have to have an actual variable outside of your object where the data is actually stored. This is key! (what confuses people initially is that when working in the Designer environment Appian makes variables for you so you can test the object but at run-time you need to have mapped your rule input to an actual piece of memory defined by a variable)
    2. When you have a User Interface in a Process Model, the User Interface sits "inside" the User Input Task. The User Interface's rule inputs nee to be mapped to variables called "Activity Class" variables - that is, those you define in the 'data' tab of the User Input Task. This is where the data is stored when the User Interface sends it to a rule input.
    3. Not only this, but if you need that data in the Process you also have to map it from the Activity Class variable to a process variable. Think of an Activity Class variable as "private" to the User Input Task, and the Process Variable global to the entire process. The data won't get out of the User Input Task's variable unless you explicitly instruct it to "save Into" a pv! from the Data tab

    Hopefully that should help you understand why the data you're entering into your paragraph field is disappearing - it isn't being stored anywhere!

  • 0
    Certified Senior Developer
    in reply to minhajk0002

    He actually did. Did you do the associate lessons in the online academy?
    I don't have it in my mind, but they should show to implement a User input task and map the form rule inputs to activity class parameter to process variables.

    perhaps this supports you:
    https://docs.appian.com/suite/help/21.4/Configuring_the_User_Input_Task.html