File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
Flow Actions/Look Up MRVS Rows Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ ( function execute ( inputs , outputs ) {
2
+ // Look up the 'Multi Row Question Answers' records associated with a specific sys_id and return the unique 'Row indexes'
3
+ var array = [ ] ;
4
+
5
+ var grMrvs = new GlideRecord ( 'sc_multi_row_question_answer' ) ;
6
+ // Update line below with correct input variable
7
+ grMrvs . addQuery ( 'parent_id' , inputs . ParentID ) ;
8
+ grMrvs . query ( ) ;
9
+
10
+ while ( grMrvs . next ( ) ) {
11
+ array . push ( grMrvs . row_index . toString ( ) ) ;
12
+ }
13
+
14
+ var arrayUtil = new ArrayUtil ( ) ;
15
+ // Update line below with correct output variable
16
+ outputs . row_index_array = arrayUtil . unique ( array ) ;
17
+
18
+ } ) ( inputs , outputs ) ;
Original file line number Diff line number Diff line change
1
+ ## Overview
2
+ To be used within an action to retrieve the unique ** Row indexes** for each row within a MRVS
3
+
4
+ ## Inputs
5
+ Pass in the sys_id of the record the MRVS is associated with. E.g., the sys_id of a RITM record.
6
+
7
+ ## Script Step
8
+ Create a script step with the code provided to look up each unique ** Row index** associated with the MRVS
9
+
10
+ ## Outputs
11
+ Returns an array of strings with each string representing the ** Row index**
You can’t perform that action at this time.
0 commit comments