using locate as a value inside if else

0

Hello, I'm trying to do this:

ifelse(locate({Billing Value},"token") DIFFERENT(i cannot put it on the post I dont know why) 0,
locate({Billing Value},"token"),
"blop"
)
but I get an error, which seems to be related to the fact of using locate as a field, but I don't understand what is going wrong.
Basically what I try to do is locate the word "token" in a field, and if it is found, I want to return its position in the string

Thanks a lot,
Tomy

Edited by: tblondeau on Oct 12, 2021 3:59 AM

Edited by: tblondeau on Oct 12, 2021 3:59 AM

feita há 3 anos317 visualizações
1 Resposta
0

ifelse(locate({Billing Value},"token") <> 0,
toString(locate({Billing Value},"token")),
"blop"
)
this fixes it, int needs to be parsed as string for this to work

respondido há 3 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas