question

Chad G3 avatar image
0 Likes"
Chad G3 asked Ryan Clark commented

Label Values Conditional Decide - odd or even value

1649702610341.png

First let me say I am not good with writing script, with that said I need to know what i need to have in the conditional decide for the condition to be true if I use a label name of Count and the numeric value the source gave the part is even. Basically I have parts representing a workorder to build a product and each part has a Count value of 1,2,3,4 etc....depending on the number off parts required. It could be as many as 100, or as smal as 1. I just need the decide to look at the numeric value and decide if it is even.

FlexSim 21.1.5
labelsdecision pointsdecidevalues
1649702610341.png (116.5 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Jason Lightfoot edited
  1. !(token.Count%2)

'Not' and 'integer mod' operators are both referenced in the manual here.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.