106
Views
6
Comments
Substr not starting from 0 but 1
Question

Hi guys,

Yesterday my system started to produce errors and I had no change so no clue why. When I investigate I got to the point that I have a substr action that checks from a string if the position 0,1 is equal to +. Normally it does so the logic after is applied but now the string is +12345 and when I ask for substr 0,1 it returns "". When I do sub string 1,1 it give the + back. I first thought maybe a space before the + but that is not the case!! So I'm wondering is there a new version in the personal cloud launched that contains a bug or am I doing something wrong...



2021-03-18 21-03-15
Benjith Sam
 
MVP

Hi Freek,

I checked the same in my personal environment -> Reactive application and it is working as expected

i.e. the Substr() function is returning the '+' symbol for the expression that is defined as mentioned below

Substr("+12345", 0, 1)


Regards,

Benjith Sam

2020-05-07 18-53-00
Rui Barradas
 
MVP

Hello Freek,

I believe that is something related with your code.

Are you altering this variable somehow in your logic before applying the substring function?

Can you share with us your logic?


Kind regards,

Rui Barradas

UserImage.jpg
freek

Hi guys thanks for replying I did a full compile of my environment and then it was working again like it should 0,1 to get the first char. Thanks for your help!

2020-05-07 18-53-00
Rui Barradas
 
MVP

Thank you for letting us know.

Glad that you manage to solve your issue!


Kind regards,

Rui Barradas

2021-09-08 14-31-39
DeeKey

Just for information, I have experienced same problem today, substr() started to behave like it considers first position as 1,  not 0.
Same solution, re-compile all related modules, and it returns to normal operation. 

UserImage.jpg
freek

Hi Deekey, it has been a while ago but glad to hear that re-compling also worked for you!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.