Expand my Community achievements bar.

SOLVED

Mass update on certain fields

Avatar

Level 4

Hello!

I would need to make a mass update on this field:

A_B_SE_0-1702565420601.png

A_B_SE_1-1702565499171.png

A_B_SE_2-1702565797470.png

When trying to do a mass update on selected lines I cannot see/select that field:

A_B_SE_3-1702565995380.png

I've tried to do it in a wkf with an update data but same there, it doesn't work.

I cannot sort the attribute either in that table view.

 

I'm guessing I need to change something at data schema level. Do you guys have some input? Is this possible to achive?

 

 

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @A_B_SE ,

those are saved as XML document so I suppose you would need to load the delivery template in JS activity with NLWS.nmsDelivery.load(pk) and try to amend that xml part.

My tip would be to print that XML to console. Take that part amend manually or programatically as string and save it back to the delivery template object with delivery.save()

 

 

 

 

var delivery, allMyDeliveryTemplates = [{id:1111},{id:1112}];
for(var i = 0;i<allMyDeliveryTemplates.length;i++){
delivery = NLWS.nmsDelivery.load(allMyDeliveryTemplates.id);
//change what you need
delivery.execution.xx
delivery.execution.controlGroup.xx

delivery.save();
}

 

 

 


Marcel Szimonisz

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hello @A_B_SE ,

those are saved as XML document so I suppose you would need to load the delivery template in JS activity with NLWS.nmsDelivery.load(pk) and try to amend that xml part.

My tip would be to print that XML to console. Take that part amend manually or programatically as string and save it back to the delivery template object with delivery.save()

 

 

 

 

var delivery, allMyDeliveryTemplates = [{id:1111},{id:1112}];
for(var i = 0;i<allMyDeliveryTemplates.length;i++){
delivery = NLWS.nmsDelivery.load(allMyDeliveryTemplates.id);
//change what you need
delivery.execution.xx
delivery.execution.controlGroup.xx

delivery.save();
}

 

 

 


Marcel Szimonisz

Avatar

Level 4

Hello Marcel, thank you.

 

Do you think is possible to just load the whole 

delivery.execution.controlGroup

from a specific delivery and insert that data to a group of deliveries?