I know this must be something simple I am missing.... Checkbox values that are checked reflect a token of Checkbox_XXX_Is_Set=True. An unchecked token value is False. How do I turn the True/False to a "1" or a "0" into another Token?
Thank you
I know this must be something simple I am missing.... Checkbox values that are checked reflect a token of Checkbox_XXX_Is_Set=True. An unchecked token value is False. How do I turn the True/False to a "1" or a "0" into another Token?
Thank you
Not sure why 1 and 0 are better values, so maybe you could tell us more about what you're trying to do. Something like this will accomplish what you've asked for:
I am creating transactions in our ERP system. I am limited to the available database fields that I can store data from the form. There are 17 possible values for a checkbox. I have one database field available to store these values. I want to create a string of 1's and 0's so that within one field I will be able to record the check choices and have them available within the ERP system. So I could create 17 conditions, but that seems cumbersome. There must be a way to turn a True into 1 and a False into a 0....?
I figured there would be more to this. Does the ERP system need 1s and 0s? Or would having a delimited list of checked values be acceptable/better? The checkbox also has a multi-value token that contains all the checked values which you could format into a delimited list through the Token Editor.
Thank you. I appreciate the help.
The length of the field that will store the responses is only 25 characters. The values are stored in the token as V_1,V_13,V_17 for only those that were checked. Depending upon the number of boxes checked, the combined field would not fit in 25 characters. It is also easier from a use perspective to check individual positions for a 0 or 1 to determine the choice rather than interpreting that the absence of V_11 means that that box was NOT chosen..
Workflow does not have a replace function, but I've adapted the workflow above by adding a For Each Value activity that will loop through your checkbox tokens.
The token created is multi-value. For example, a checkbox like this:
will give you a token with values:
1
0
1
When you use the token, you want to format it as a list in the token editor
to convert it a list: 1, 0, 1.
So, technically, you still have to go through the 17 tokens, but you don't have to create 17 decision activities.
Thank you. This looks promising. However, the For Each Value seems to only be processing the checked items. There are 17 checkboxes but the iteration count shows 4 (I checked only four of the 17 boxes).