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

已提问 3 年前320 查看次数
1 回答
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

已回答 3 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则