delete and update the data based on the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 01:53 AM
Hai All,
my question is , i have created a custom table on that i have created a field to attach an file to load the data in to the child table . still there i was working fine ,
on the custom table i have created a field true or false , when i select true the child table data should be deleted and again it should be loaded as well as for false also.
I want to delete the data and reload the data again how can we do it. please guide me on this over to fix it ,
thank you ,
Sekhar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 04:03 AM
1. Try to use the 'changes' operator in the condition
2. In script, use if, else to check for true/false.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 04:17 AM
can you send the script please.
var items = new GlideRecord('u_item_changes_volume');
items.addQuery('u_event',current.sys_id);
items.addNotNullQuery('u_current_store_count');
items.addNotNullQuery('u_future_store_count');
//items.addNotNullQuery('u_annual_units_replenishment');
items.query();
if(items.next()){
items.u_current_store_count = '';
items.u_future_store_count = '';
//items.u_annual_units_replenishment = '';
items.update();
}
else