- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2024 10:52 PM
Hi guy's, Recently I have created a new entry in the table for Requests/tickets which shows for what purpose this Ticket was raised for, the newly created entry was already there in the record producer but there was no entry created in database level or table level , so after creating the new entry in the table and mapping it from intake level to table the new field is getting populated for new requests but not for older requests. How should I make this field populated for older requests .
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2024 12:30 AM
If you Found helpful please accept the solution 🙂
If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!
Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI
ï”— YouTube: https://www.youtube.com/@learnservicenowwithravi
ï”— LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2024 11:03 PM - edited ‎08-26-2024 11:30 PM
Hi @Niletor
For already existing field if you need to update all together better go with Fix Script.
Glide to the table add Query to it to whatever record you wanted to update and then run the script.
Below is just Sample (and it will update all record so choose your field wisely):-
If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!
Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI
ï”— YouTube: https://www.youtube.com/@learnservicenowwithravi
ï”— LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2024 12:30 AM
Thanks Ravi, but it is not working for more clarity this-
I have newly created an entry/field in the table for which purpose the request is raised, name-"tgov_purpose" .this field gets populated from the intake/record producer level with question name -"what_purpose". After creation whatever value we are putting in intake form for "what_purpose" ,the field for "tgov_purpose" also gets filled for new records but not for older records, How can I make this "tgov_purpose" populated for previously created Records/Requests
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2024 12:40 AM
Hi @Niletor
I agree with @Dr Atul G- LNG if the count is Less then you can update at one go together as shown in the figure below :-
Press shift downward arrow and double click the first cell
or Use the Backgrounnd script (Not a best practice) or Fix Script (Best Practice)
// Query the table where you want to update records
var gr = new GlideRecord('your_table_name'); // Replace with your table name
gr.addQuery('tgov_purpose', ''); // To find records where tgov_purpose is empty (optional)
gr.query();
while (gr.next()) {
// Get the value from the intake/record producer form's field
var whatPurpose = gr.what_purpose; // Adjust based on how you store or access this data
// Set the value to the new field
gr.tgov_purpose = whatPurpose;
// Update the record
gr.update();
}
If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!
Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI
ï”— YouTube: https://www.youtube.com/@learnservicenowwithravi
ï”— LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2024 11:27 PM
Hi @Niletor
It depends on what type of field it is. Usually, we avoid populating new fields for old records, it can impact reporting / SLA as well and also in this case the value will be the same for all old records.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************