Record Producer

Transforming Choices (Select 1) into a Multiple List (Select N)

      Use Case: In a Record Producer we have a variable of type Multiple Choice.

      A Multiple Choice type allows the user to select 1 option between the available ones.

      - What if we need to allow the user to choose 2 or more options? In this article we'll discuss a possible solution for this scenario.

      In the RP we have a Multiple Choice variable, with some Choices.

      1) Edit this variable and copy its sys_id;

      2) Change the type to List Collector and, in the Type Specifications tab inform:

      List table: Question Choice [question_choice]

      Reference qualifier: question=(sys_id copied in Step 1)

      3) Save the record and see the effect in the Service Portal, refreshing the Record Producer page.

      The phase 2 is to create a table column to store the information.

      4) Within your table, create a new column:
      Type: List

      In the Choices tab, create the same options (and values) as the Record Producer. Wait... if you create these values, the sys_id will be different and they won't match.

      To avoid this, in the Reference Specification tab, provide:

      Reference: Question Choice [question_choice]

      Use Reference Qualifier: Advanced

      In the textarea: question=(sys_id copied in Step 1)

      5) We must remember to store the RP value in our table column using the RP script area.

current.options = producer.options; //The variable name is defined by you. In my case, I named it as 'options' in both sides.

      Ok, now we're all set.

      Thank you for reading!