Hi All,
Hopefully a simple one,
I have an input field for a barcode, I then have some logic to check the length of the barcode,
This works, so at the moment, if the number above is 15 characters it returns yes, if not then no, so far so good.
What I would like to do is update context if yes, or no.
I have tried the obvious,
If(Len(LabBarcode.Text)=15,UpdateContext({bccheck:true}),UpdateContext({bccheck:False}))
But I get a behaviour function error.
I would like this validation to update the visibility of the go button next to the control as seen above. Basically, the go button should only show if the number is 15 characters long.
Can anyone help with a method to do this please?
Many thanks in advance for any responses.
@AJ_Z Thanks very much for taking the time to reply! That's a really simple and elegant solution.
Simply make the visible property of the button:
Len(LabBarcode.Text)=15
if it equals 15 it will appear. Personally I choose to disable buttons but this will work to hide and show it if that is the need 🙂
You should not need to use updatecontext for this scenario a variable is not needed
Let me know if you need some more help or if this is the solution.
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional