passing process variable to interface(Records Tutorial)

Hi,

     I am using 18.1 and trying records tutorial by following https://docs.appian.com/suite/help/18.1/Records_Tutorial.html

     I was stuck at Add a Related Action point 4 where we need to pass process variable to query rule. I know its not in very detailed but generic steps . As a newbie, I  need guidance in proceeding further in the tutorial.

step 4: For the User Input activity, assign the task to "=pp!initiator", and create a form titled "Update Phone Number" with one text field called "New Phone Number" that has a default value of rule!getEmployeeById(pv!employeeId).phoneNumberand saves into ac!newPhoneNumberac!newPhoneNumber should then be saved into a process variable so that it can be accessed by other nodes later in the process.

          

           Here text field for new Phone Number that i am creating.

a!textField(
  label: "New Phone Number",
  labelPosition: "ABOVE",
  value:  rule!getEmployeeById(pv!employeeId).phoneNumber,
  saveInto: {ac!newPhoneNumber},
  refreshAfter: "UNFOCUS",
  validations: {}
)

The error i am getting in interface is "Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error: Invalid variable(s) found: pv!employeeId,ac!newPhoneNumber."

      I would like to know how do i create activity class variable ac!newPhoneNumber and pass it to another process variable?  Any help would be appreciated.

 

 

 

     Attaching screen shots for process variable declaration and  query rule that i created

 

Thanks.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    Hi Krisk,

    In your form, "Update Phone Number", create a rule input 'newPhoneNumber' of desired type(integer or text,, etc). Then, in the value and saveInto parameter of the textField(), write the following expression:
    value: ri!newPhoneNumber,
    saveInto: ri!newPhoneNumber

    Now when you will call the form under the 'forms' tab of your 'user input task', you will map your rule input, i.e 'newPhoneNumber' with activity class parameter 'newPhoneNumber'. Then under the 'data->input' tab of your 'user input task', map the activity class parameter 'newPhoneNumber' to the process variable 'newPhoneNumber'.
    Now, you can use this process variable further in your process model. i.e. passing the pv value to another expression rule and so on.
Reply
  • 0
    Certified Lead Developer
    Hi Krisk,

    In your form, "Update Phone Number", create a rule input 'newPhoneNumber' of desired type(integer or text,, etc). Then, in the value and saveInto parameter of the textField(), write the following expression:
    value: ri!newPhoneNumber,
    saveInto: ri!newPhoneNumber

    Now when you will call the form under the 'forms' tab of your 'user input task', you will map your rule input, i.e 'newPhoneNumber' with activity class parameter 'newPhoneNumber'. Then under the 'data->input' tab of your 'user input task', map the activity class parameter 'newPhoneNumber' to the process variable 'newPhoneNumber'.
    Now, you can use this process variable further in your process model. i.e. passing the pv value to another expression rule and so on.
Children
No Data