- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 02:38 AM
Hello all,
I am just having a confusion for moving the data from one field to another of user table for all the existing records. The confusion is what method should I opt flow designer, schedule job or fixed script? Which method is best fit.
I tried with flow designer first, its working fine when tested but I am running it once at a specific time to move one field data to other but it's not working. I found the issue is with time zone. Can anybody suggest, the time shown in executions of flow designer is which time zone and how it's taken.
Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2023 10:48 AM
Hi @poojavaishnav ,
Flow Designer is suitable when you want to create a workflow-like process that may involve multiple steps and conditions. It provides a visual interface for building workflows.
Use fix script for this,
var userGr = new GlideRecord('sys_user');
// Add any conditions if needed (e.g., to filter specific records if not please do not include addQuery)
userGr.addQuery('your_field', 'your_value');
userGr.query();
while (userGr.next()) {
var sourceValue = userGr.getValue('source_field'); // Replace 'source_field' with your source field name
userGr.setValue('target_field', sourceValue); // Replace 'target_field' with your target field name
userGr.update();
}
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2023 07:41 PM
Hi, perhaps you could provide clear details of your requirement and the business drivers behind the requirement; this would allow the community to review and advise but without any clear details of your configuration and issue any response is just guessing.
If you are moving data from 1 field to another field as a 1 off occurrence, then a fix script would be the most appropriate way to deliver this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2023 10:48 AM
Hi @poojavaishnav ,
Flow Designer is suitable when you want to create a workflow-like process that may involve multiple steps and conditions. It provides a visual interface for building workflows.
Use fix script for this,
var userGr = new GlideRecord('sys_user');
// Add any conditions if needed (e.g., to filter specific records if not please do not include addQuery)
userGr.addQuery('your_field', 'your_value');
userGr.query();
while (userGr.next()) {
var sourceValue = userGr.getValue('source_field'); // Replace 'source_field' with your source field name
userGr.setValue('target_field', sourceValue); // Replace 'target_field' with your target field name
userGr.update();
}
Thanks,
Anand