how to fetch multiple values from custom table as Lookup fetches only one record

Hi,

I have 3 fields in custom table:

Team

System

Groups Available

values in custom table are like for Team A and System A, Groups Available can be AB1, AB2, AB3. So there will be 3 records for the combination of A and B in custom table. 

In offering, I am providing 3 useroptions, 

UO1: entity link fetches Team values from custom table

UO2: entity link fetches System values from custom table

UO3: fetches Groups Available values from custom table

Use Case is : When user selects value "A" in UO1, value "B" in UO2, then UO3 should be populated with values AB1, AB2 and AB3. (Here, populated means it should not come appear in list, from which user can select 1 or multiple values. populate means in 1 String field, all 3 values should be visible, may be separated by comma ",". user will not get option to select anything.)

I tried with "Define suggested values based on filter" rule, using UO3 as entity link type field. but here all 3 values appear as list. User doesnot want to allow user to select anything. User wants all 3 values to be there showing in 1 line.

then I tried with Lookup expression function, using UO3 as String type. But here lookup returns only 1 record. so I can see only 1 Groups Available value in UO3 field.

I tried using concat function, but that didnot return me anything.

Can you please help me what function to be used if i want to pull multiple values in String type field?

Thanks in advance,

Darshana

  • 0  

    Hi Darshana,

    The best way I can think of is by using the Integration Engine. That way you use a SMAX integration to your tenant and then use the GET record. It would mean passing the User options through into the Integration Scenario and then use those as the Filter on the Custom record. With that the response from the Get request would contain the required data for the Team and System based upon the User options.

    As a Test I tried preparing a simple Scenario with dummy data:

    Then using the Custom Record where the data was held used the GET request:

    This then produced the Output of:

    {"SMAXRecord":{"displayLabel":{"entities":[{"entity_type":"GroupsAvailable_c","properties":{"LastUpdateTime":1724071361708,"Id":"59669","DisplayLabel":"AB2"},"related_properties":{}},{"entity_type":"GroupsAvailable_c","properties":{"LastUpdateTime":1724071397788,"Id":"59766","DisplayLabel":"AB1"},"related_properties":{}},{"entity_type":"GroupsAvailable_c","properties":{"LastUpdateTime":1724071342266,"Id":"59767","DisplayLabel":"AB3"},"related_properties":{}}],"meta":{"total_count":3,"completion_status":"OK","errorDetailsList":[],"errorDetailsMetaList":[],"query_time":1724082662347382}}}}

    Then that would mean you could take this Output to then import back into your User Option for populating the Group information.

    In order to use the Integration Engine to run this you'd have to create an After Applying Changes rule within the Offering. So then the user would have to supply the Team and System only and then the Scenario would run and then return the appropriate Groups which you could put into another User Option for Agent only. That would prevent any user interaction from the Group point of view. Its something worth trying and the best way I could see how to achieve what you'd like to do.

  • 0   in reply to   

    Thank you so much Dave for the reply. 

    Actually this solution is used with rule in "After Applying changes". but we need to pull values of "Groups Available" in service portal before raising request.

    When user will select Team and System values in Service Portal, "Groups Available" should be visible.

    Please help me if any workaround is there.