How Do I Create A Server Action Condition: Value Contains 'xyz'?

Maybe I’m being a bit slow here after the summer holidays…

But if I have a server action value called this_value, how can I create a condition which says:

if (this_value contains the string 'xyz') then

Well Antony, just use the contains formatter available in the server data picker:

1 Like

Oh yes, I’m still a bit slow with Wappler after the summer…

Thank you Teodor, and for replying on a Friday night.

I hope you had a lovely summer! :slight_smile:

Hello, in the same vein as the previous question. I want to add a condition and assign it the value 1 if the condition is true. However, when I test it, it should be false and return 0, but this is not the case.

  • I highly recommend not exposing your encryption key directly (especially in public). Instead, store it as a global variable so that if you ever need to update it, you can do so in one place without having to search through all your SC actions to find where it's used.
  • In your case, I don't think you need to use .then, since .contain immediately returns a boolean value — either true or false.

thanks i ll try

No, that's not the reason, if you want to re-read it, thank you. @Teodor , a n idea ?

I don't understand anything from your screenshot. What should i be looking at?
What do you want to achieve and what is the exact expression used?