Catalog Varible - Reference groups and show sys_users

sosman
Tera Contributor

Hi,

I am quite new to building and creating in SNOW

I have a portal form that needs updates. What I am trying to achieve is when a user selects an option from multiple choice, the next question pull data based on their selection. The options in question 2 refer to groups that are currently in the system and has specific users/approvers associated to them.

Question 2 and 3 in screenshot below 

sosman_0-1686014158533.png

Below are the groups that contain users. When users select an option from question 2 (above) then questiong 3 (above) shows only the user from relevant group below.

sosman_0-1686015001331.png

 

 

We have a flow that sends approval to all staff members currently. (let me know screenshots required). The change would 

So far I have created a variable that references the sys_user_grmember table

I'm not much of a coder so any assistance/details would be great. Please let me know if you require more information and I can provide that.

Thank You

Sid

3 REPLIES 3

Brad Bowman
Kilo Patron
Kilo Patron

A reference variable on sys_user_grmember is a good start.  You'll need to add a reference qualifier similar to this:

BradBowman_1-1686063195195.png

where 'v_group' is the name of your variable for question 2.  This is expecting a sys_id, so the Value of each Question Choice in the Multiple Choice question 2 should be the group sys_id that matches each name in the Text. 

 

Hi Brad,

I have made the changes as requested

Please see the screenshot below and the results being produced when testing in the portal

sosman_0-1686196337441.png

The Value field in the question choices below is the sys_id for the specific groups (please correct me if im wrong). I have also tried to the update the text field in the question choice to match the group name thinking that might be an issue but no change

sosman_1-1686196412932.png

When testing the portal form it gives results as below

sosman_2-1686196489108.png

 

Any further help would be greatly appreciated

 

Thank You

 

Brad Bowman
Kilo Patron
Kilo Patron

It looks like your Course Approver reference is showing sys_created_on as a display field.  If this were showing the User field instead, maybe the choices are the correct ones now as the group changes?  To change the Display field, view any sys_user_grmember record.  In the Header it will say Group Member, then underneath is the Display field.  You want this to be the User's name, not created on or group or anything else, so right-click the header and choose Configure > Table.  Set the value in the Display column to 'true' for User and 'false' for all others.

BradBowman_0-1686231227586.png

BradBowman_1-1686231248546.png