Jump to content

Concatenation and parsing


42n81
 Share

This topic is 5768 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hi there,

I'm using the new List function, and it's really sped one of my scripts up, but to pass data between several fields, I need to work with a concatenated field. That's no problem. The problem is that when I parse the data from the concatenated field, using the

MiddleWords() script step, negative numbers lose their sign.

I'm sure there are plenty of ways around this, but does anyone know the best practice/easiest way?

Thanks,

Dave

Link to comment
Share on other sites

If I am reading your post correctly, I think you have created a calculation using a list function that gives you a list of a concat field, which you use a space as a delineator. Then you want to parse out each individual row of the list into seperate fields.

If that is the case and since the "-" character is regarded as a space, you would need to use a substitute function to substitute the "-" character for something else "*" then use a another substitute for your parsing calc to get the "-" back

Link to comment
Share on other sites

  • Newbies

Yep, you get it.

Sorry I wasn't more careful or explicit in my initial post. I was guessing the solution would require Subtitute, but didn't fully get why. (I thought maybe GetAsNumber() would make FMP realize the "-" was a minus sign rather than a hyphen, which you say counts as a space.)

Thanks for the help, and for the recommendation.

Link to comment
Share on other sites

This topic is 5768 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.