AnswerHub Upload Issue
Our AnswerHub community currently has a bug that prevents you from attaching your model or other files to your questions. AnswerHub is aware of this issue and they are working on a fix. Until we receive their patch, you can upload your models and other files to FlexSim's file share site. Include the file name in your question so that we know which upload to reference.

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.

Hi @Chad G3, was Jason Lightfoot's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Jason Lightfoot edited
!(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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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