### Title

Help with Replace Field Contents in a Script.

### Post

Hello Forum & Phil. I was wondering if there was a better way to write this script. Shown below on the screenshot (upper left corner) is a field on the layout. It has Global Storage and is one cell (comprised of 2 pieces of data) and is updated via script to import from an Excel Spreadsheet--no problems with this.

Below this on the screenshot, with one of the 2 steps highlighted in question, is the step where I extract the number on the right side of the "/" . I repeat this for the left side of the "/". This works fine also.

Here's my question. In the near future those numbers will change to 6 digit numbers. So either I would have to change this script step (or remember to) when that happens, or change the script step so it would take all the numbers from the right side of the "/". And of course change the other script step for the left side.

As always any help or direction is always greatly appreciated.

Thanks

Steve

You could use the Position function to find the postion of the / character and then extract the digits to the left and right of this position, but Raybaudi showed me a better way some time back:

GetValue ( Substitute ( Contacts::ImportedDDayinfo ; "/" ; ¶ ) ; 1 )

returns the digits to the left of /

GetValue ( Substitute ( Contacts::ImportedDDayinfo ; "/" ; ¶ ) ; 2 )

returns the digits to the right.