- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 11:00 AM
I need to populate the current date and time in the below attached variables when perform restart immediately is checked. Please suggest
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 03:39 AM
Hi @Archana23
Please Create a new Catalog Client Script or do modifications in your catalog client script as I mentioned below, This will solves your Query:
Create a Catalog Client Script
Name :
Applies to : A Catalog Item
UI Type : Desktop/ All
Type: onChange
Catalog Item: Select your Catalog Item
Variable name: Perform Restart Immediately
Applies on Catalog Item View : Tick
if(newValue === 'true') {
var now = new Date();
var fDT = now.toISOString();
g_form.setValue('variable1name' , fDT);
g_form.setValue('variable2name' , fDT);
}
//change variable name according to your current variable name.
Note: Please Mark this Helpful and Accepted Solution. If this Helps you to understand. This will helps us a lot.
Thanks & Regards
Deepak Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 04:03 AM
Hi @Archana23,
Looking at your script, line 11, the 1st parameter within the g_for.setValue() method required quotes around it.
Assuming restart_at is the field name you're setting, line 11 should be exactly as below (including the single quotes)
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 03:39 AM
Hi @Archana23
Please Create a new Catalog Client Script or do modifications in your catalog client script as I mentioned below, This will solves your Query:
Create a Catalog Client Script
Name :
Applies to : A Catalog Item
UI Type : Desktop/ All
Type: onChange
Catalog Item: Select your Catalog Item
Variable name: Perform Restart Immediately
Applies on Catalog Item View : Tick
if(newValue === 'true') {
var now = new Date();
var fDT = now.toISOString();
g_form.setValue('variable1name' , fDT);
g_form.setValue('variable2name' , fDT);
}
//change variable name according to your current variable name.
Note: Please Mark this Helpful and Accepted Solution. If this Helps you to understand. This will helps us a lot.
Thanks & Regards
Deepak Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 06:06 AM
Hello Deepak,
Thanks for sharing in detail, it is working as expected.