0

I have data with this format: 4024-457 and I need to separate the left and right portions from the '-'. The data is not always in that proportion (4 numbers left and 3 to the right) so I need to calculate the position of '-' to extract both sides.

In the case of left numbers I used this expression:

Left($feature.R_ROL,Find('-', $feature.R_ROL))

But i don't find the way to extract the right portion of the main data. In ArcMap I used a VBscript expresion like this.

Right( [R_ROL] , Len( [R_ROL])- (InStr( [R_ROL] , "-")))

I can't find anything like the Len function to calculate the total lenght of the field to recreate something like the above. I'm still new to Arcade.

2 Answers 2

0

Ok, I have found how to do this. If anyone is interested, the right portion of the expression was calculated this way:

Right($feature.R_ROL,(Count($feature.R_ROL) - (Find('-', $feature.R_ROL) +1)))

R_ROL is the field to search for and - is the character used to calculate right and left portion.

0

You can also do the following:

Back(Split($feature.R_ROL, "-"));

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.