Hide the variables field in RITM based on created date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2023 10:39 AM
Hi all,
I have a requirement hide the variables field in RITM based on before created date and If
Select Application from the list(this is variable in the catalog item) is Foxit PDFEditor.
example: which RITM are created before 4-Nov-2023.
Note: In RITM there is a variables section, These all are coming from catalog item.
As per my requirement I want to hide highlighted field in pic
1)AD Group for Computer
2)Uninstall AD Group
Please find the attached document.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2023 12:08 PM
Hi,
Need more clarification on your question on "before created date"? Is 4th-Nov-2023 is static?
To implement this, please have a UI Policy or a onload client script, which is applied on
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2023 07:28 PM
Hi @murali_bsy ,
1)Select Application from the list
2)AD_Group_for_Computer
1& 2 variables are comming from catalog item. If we right direct onload client script in sc_req_item table if we use directly your code how that variables values get from that varibles are not created in sc_req_item.then how that variables get from them.
I have tried with your code but not getting.
Please read requirement once again I hope you get understand clearly.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2023 12:37 PM - edited 11-25-2023 12:39 PM
Hi @Sirri ,
You can create a client script on the Requested Item table (sc_req_item).
The client script should be onLoad.
For example:
function onLoad() {
var variable= g_form.getValue('variables.select_application_from_the_list'); // get the value of Select Application from the List
if(variable=='Foxit PDFEditor'){ // verify if the value is Foxit PDF Editor
g_form.setVisible('variables.AD_Group_for_Computer',false); // Hide the variable AD Group for Computer when the variable is Foxit PDFEditor
}
}
Where you see 'variables.select_application_from_the_list' you need to add the name of your variable, you might want to check on the catalog item how it was configured, so it will be variables.{the name of your variable} , same thing for the 'variables.AD_Group_for_Computer
Where you are setting the g_form.setVisible you can add below the same code for the other variable that you need to hide.
And regarding your date condition just add in the If what you need to check 🙂
If that helps please mark my answer as correct / helpful!
And if further help is needed please let me know
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2023 07:27 PM
Hi @Clara Lemos ,
1)Select Application from the list
2)AD_Group_for_Computer
1& 2 variables are comming from catalog item. If we right direct onload client script in sc_req_item table if we use directly your code how that variables values get from that varibles are not created in sc_req_item.then how that variables get from them.
I have tried with your code but not getting.
Please read requirement once again I hope you get understand clearly.
Thank you.