delete and update the data based on the field

sekhar6
Tera Contributor

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.

6 REPLIES 6

1. Try to use the 'changes' operator in the condition

reshmapatil_0-1671192154059.png

2. In script, use if, else to check for true/false.

 

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