Hello,
i've got an issue where i want to use a Toggle, if true then the text is "IN", if false then text is "OUT"
i've set the TrueText = "IN" and Falsetext = "OUT" the output needs to be added to a collect which is then uploaded,
the code to build the collect is
Collect(collectMultiScan,
{
Direction: Toggle1.Value,
Barcode: BarcodeScanner2.Value,
Time: Now()
}
)
the problem i have is the toggle1.value is true or false, and ides how to change it to IN or OUT?
Solved! Go to Solution.
thank you, it's now working i added a new button saved and published re-loaded on my phone and it wasn't showing the new button, so closed my session re-applied the code that you posted, saved published and then new version then got loaded correctly and worked
Consider this:
Collect(
collectMultiScan,
{
Direction: If(
Toggle1.Value,
"IN",
"OUT"
),
Barcode: BarcodeScanner2.Value,
Time: Now()
}
)
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
added the code i'm now just getting "out" no matter what option is selected on the toggle
I tested the code but it works fine.
Where did you put the Code, also note the name of your Toggle1?
Can you give a screen shot
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
code added to the onscan button, also name is toggle1
Collect(collectMultiScan,
{
Direction: If(
Toggle1.Value,
"IN",
"OUT"),
Barcode: BarcodeScanner2.Value,
Time: Now()
}
)
I see an error on the Formula (Red), have you checked that?
Also copy the formula and try it on OnSelect of a Button if that will work
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
error is now gone, still only showing out even is the toggle is set to in
Have tried the formula OnSelect of another button?
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
thank you, it's now working i added a new button saved and published re-loaded on my phone and it wasn't showing the new button, so closed my session re-applied the code that you posted, saved published and then new version then got loaded correctly and worked