8
Views
4
Comments
Solved
How to set condition for btn that is shown if ID start only with the specific symbol
Application Type
Traditional Web

Hello,

How to set a condition for a button that should be visible only if the ID of the item starts with the "55", for example.

if(ID like '55%', 1,0)  ????

Thank you.


Rank: #171
Solution

Hi Ekaterina,

More one example how you can do it:



You can also create a local Boolean variable, set this variable in the preparation and assign it to the button visible propertie.

Regards.

Rank: #290

You can set condition something like this in the Visible property of the Button:

If(Index(ID, "55") = 0,True,False)

Hope this helps, Thanks :)

Rank: #171
Solution

Hi Ekaterina,

More one example how you can do it:



You can also create a local Boolean variable, set this variable in the preparation and assign it to the button visible propertie.

Regards.

Champion
Rank: #99

Hi,


I agree with all that is said before, but just one point (personal oppinion and security best practice):

For security reasons it's better to use that condition in an If and place the button inside the true branch, because if you use the visible property the HTML is loaded and someone with good knowledge can override that property.

If you place that button inside an If, when false, the HTML for it is not loaded, so, it's something that can't be manipulated in the client side.


Hope this can help!


Best regards,

Ricardo M Pereira

Rank: #171

Exactly Ricardo, well remembered.