save grid values on submit

 Hi all,

  am new to appian,

i have a grid with 2 columns, Approvers and Level, on submit how can i save these grid values to an array in process variable and get the distinct values.

Thanks in advance

  Discussion posts and replies are publicly visible

Parents
  • Hi Vineeth

    Assuming you're capturing both the Approver and the Level as two separate data items (rather than the Level being pre-defined for a given Approver) then:

    1. your list of Approvers needs to be saved to a rule input in your interface. Assuming these are Users then your rule input will be of type 'User' and will be an array
    2. your corresponding list of Levels will also need to be saved to a rule input in your interface. Assuming these are integers then your rule input will be of type 'Integer' and will be an array
    3. In your process model you'll need two process variables, one of type 'User' (set as a 'multiple') and the other of type 'Integer' (also set as 'multiple')
    4. Add a User Input Task smart service to you process model.
    5. Configure this node to use the form you created above. When you do this Appian will ask if you want to create the corresponding variables in the Data Inputs. Answer 'Yes' to this.
    6. In the Data Inputs tab you can then set the 'Save into' to copy the relevant values (known as 'Activity Class' variables which are effectively 'private' to the Task) into the relevant pv! variables where they are effectively 'public' to the Process Model.

    You had a question about getting the distinct values. You can enforce uniqueness in the form itself. Use the fn!union() to remove duplicates from your lists as they are saved to the rule inputs.
Reply
  • Hi Vineeth

    Assuming you're capturing both the Approver and the Level as two separate data items (rather than the Level being pre-defined for a given Approver) then:

    1. your list of Approvers needs to be saved to a rule input in your interface. Assuming these are Users then your rule input will be of type 'User' and will be an array
    2. your corresponding list of Levels will also need to be saved to a rule input in your interface. Assuming these are integers then your rule input will be of type 'Integer' and will be an array
    3. In your process model you'll need two process variables, one of type 'User' (set as a 'multiple') and the other of type 'Integer' (also set as 'multiple')
    4. Add a User Input Task smart service to you process model.
    5. Configure this node to use the form you created above. When you do this Appian will ask if you want to create the corresponding variables in the Data Inputs. Answer 'Yes' to this.
    6. In the Data Inputs tab you can then set the 'Save into' to copy the relevant values (known as 'Activity Class' variables which are effectively 'private' to the Task) into the relevant pv! variables where they are effectively 'public' to the Process Model.

    You had a question about getting the distinct values. You can enforce uniqueness in the form itself. Use the fn!union() to remove duplicates from your lists as they are saved to the rule inputs.
Children
No Data