- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2023 02:02 AM
Dear Team,
I have the below variables:
1# Requested for (requested_for)-> Reference from sys_user Table
2# access_request_type-> Select Box/Choices: Add, Change, Remove
3# access_change _perma_OR_tempo-> Select Box/Choices: Permanent, Temporary
4# system_access-> Select Box/Choices: SAP, Ops in a box, Resident Portal, Credit Check
5# change_of_access_request-> Select Box/Choices: SAP, Resident Portal, Credit Check, SAP Concur
6# vip_requested_user_requestaccess_locations-> List Collector from cmn_location Table
7# properties_access_require-> Reference from cmn_location Table
The requirement is: Variables 6 and 7 should be displayed only when the user selected in variable 1 is VIP (VIP-True) AND variable 2 is one of Add/Change AND variable 3 is one of Permanent/Temporary AND variable 4 is one of SAP/Resident Portal OR variable 5 is one of SAP/Resident Portal.
To fulfil this I approached UI Policy/Action (as shown below screenshot)
But Condition part 'user selected in variable 1 is VIP (VIP-True)' is NOT achievable through UI Policy due to which Variables 6 and 7 are getting displayed when the rest mentioned conditions are met, this is not desirable.
Please help on how to get this fulfilled. I will mark responses as correct and helpful if resolved.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2023 10:50 AM - edited 06-25-2023 10:51 AM
@rishabh31 I recommend you to
1. Create another variable of type (checkbox) called "vip_user".
2. Set that variable "vip_user" to read-only for the time being and hide it later once the requirement is achieved.
3. In the record producer/service catalog navigate to the "Catalog Data Lookup Definitions" tab and create a new record with the below details.
4. In the above created catalog data lookup definition "Set VIP User field", navigate to the "Catalog Matcher Definition" tab and create a new record as below. In my case the variable name is "requested_user", you will have to select "requested_for".
5. Navigate to the "Set VIP User field" catalog data lookup definition created in the step 3 and create a new "Catalog setter variable definition: as below.
6. In my PDI Abel is non-vip & Aqib is a VIP user and see how the check box behaves for these users.
7. Modify your UI policies to use the 'vip_user' variable.
Note: While testing make sure the user is active.
Please mark the appropriate response as correct answer and helpful
Thanks!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2023 04:41 AM
@rishabh31 The same functionality can be achieved by calling a script include using an AJAX call, but there is an out of the box functionality which does not need any code changes and that is why I suggested you to use that.
Even if you make an AJAX call and find out if the selected user is a VIP user, this can only be used within the same client script if you want to use this flag across other client scripts & UI Policies, you need to store this in a variable.
You can set the Hidden checkbox of the vip_user variable to false, once this is done users cannot see the field on the form but this will still be available for you to use in the UI policies & other client scripts.
Please mark the appropriate response as correct answer and helpful.
Thanks!!