Jump to content

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

Recommended Posts

Posted

Sorry---don't know too much. I have a field called "code" that could have 1, 2, 3, or more codes, separated by a double quote (I don't have a choice). Example, code = AA, or AA"BB"CC. I want a calculation to look at "code", and put the results in a field called "display." There could be 1 result, or 3, or 10. By using a Case statement with PatternCount for each code and it's result, I got it working but it only spits out the first result. How do I make it look at all the codes in the "code" field and spit out ALL of the results in the "display" field (separated by a line break, comma, whatever). ::? THANKS!

Posted

Sorry---don't know too much. I have a field called "code" that could have 1, 2, 3, or more codes, separated by a double quote (I don't have a choice). Example, code = AA, or AA"BB"CC. I want a calculation to look at "code", and put the results in a field called "display." There could be 1 result, or 3, or 10. By using a Case statement with PatternCount for each code and it's result, I got it working but it only spits out the first result. How do I make it look at all the codes in the "code" field and spit out ALL of the results in the "display" field (separated by a line break, comma, whatever). :?: THANKS!

Posted

Sorry---don't know too much. I have a field called "code" that could have 1, 2, 3, or more codes, separated by a double quote (I don't have a choice). Example, code = AA, or AA"BB"CC. I want a calculation to look at "code", and put the results in a field called "display." There could be 1 result, or 3, or 10. By using a Case statement with PatternCount for each code and it's result, I got it working but it only spits out the first result. How do I make it look at all the codes in the "code" field and spit out ALL of the results in the "display" field (separated by a line break, comma, whatever). :?: THANKS!

Posted

To rephrase, all you want is to essentially replace the double quotes with a comma, blank, or tab?

Use the Substitute() function. Bang. You're done.

If you need to process these 'codes' further, then pop them out into repeating fields... but you do have to learn how to properly use repeats. If you're just starting with FM, you might want to wait a few weeks to get more of the basics solidly under your belt.

Posted

To rephrase, all you want is to essentially replace the double quotes with a comma, blank, or tab?

Use the Substitute() function. Bang. You're done.

If you need to process these 'codes' further, then pop them out into repeating fields... but you do have to learn how to properly use repeats. If you're just starting with FM, you might want to wait a few weeks to get more of the basics solidly under your belt.

Posted

To rephrase, all you want is to essentially replace the double quotes with a comma, blank, or tab?

Use the Substitute() function. Bang. You're done.

If you need to process these 'codes' further, then pop them out into repeating fields... but you do have to learn how to properly use repeats. If you're just starting with FM, you might want to wait a few weeks to get more of the basics solidly under your belt.

Posted

To rephrase, all you want is to essentially replace the double quotes with a comma, blank, or tab?

Use the Substitute() function. Bang. You're done.

If you need to process these 'codes' further, then pop them out into repeating fields... but you do have to learn how to properly use repeats. If you're just starting with FM, you might want to wait a few weeks to get more of the basics solidly under your belt.

No, I don't need to substitute. I need the calculation to look at the code(s) that are in "code" field and put the result(s) in the "result" field. Thanks!

Posted

To rephrase, all you want is to essentially replace the double quotes with a comma, blank, or tab?

Use the Substitute() function. Bang. You're done.

If you need to process these 'codes' further, then pop them out into repeating fields... but you do have to learn how to properly use repeats. If you're just starting with FM, you might want to wait a few weeks to get more of the basics solidly under your belt.

No, I don't need to substitute. I need the calculation to look at the code(s) that are in "code" field and put the result(s) in the "result" field. Thanks!

Posted

To rephrase, all you want is to essentially replace the double quotes with a comma, blank, or tab?

Use the Substitute() function. Bang. You're done.

If you need to process these 'codes' further, then pop them out into repeating fields... but you do have to learn how to properly use repeats. If you're just starting with FM, you might want to wait a few weeks to get more of the basics solidly under your belt.

No, I don't need to substitute. I need the calculation to look at the code(s) that are in "code" field and put the result(s) in the "result" field. Thanks!

Posted

Are you trying to generate the results into seperate entries for the "display" field, or a repeating field? If not, and the results are generated into a single corresponding "display" field with the values only delineated by a comma or other charcter, why not use a substitute?

I'm not sure exactly what you are trying to accomplish.

Example, code = AA, or AA"BB"CC

display= AA,BB,CC

or are you trying to get 3 seperate records of display / repeating field

AA

BB

CC

Posted

Are you trying to generate the results into seperate entries for the "display" field, or a repeating field? If not, and the results are generated into a single corresponding "display" field with the values only delineated by a comma or other charcter, why not use a substitute?

I'm not sure exactly what you are trying to accomplish.

Example, code = AA, or AA"BB"CC

display= AA,BB,CC

or are you trying to get 3 seperate records of display / repeating field

AA

BB

CC

Posted

Are you trying to generate the results into seperate entries for the "display" field, or a repeating field? If not, and the results are generated into a single corresponding "display" field with the values only delineated by a comma or other charcter, why not use a substitute?

I'm not sure exactly what you are trying to accomplish.

Example, code = AA, or AA"BB"CC

display= AA,BB,CC

or are you trying to get 3 seperate records of display / repeating field

AA

BB

CC

Posted

Are you trying to generate the results into seperate entries for the "display" field, or a repeating field? If not, and the results are generated into a single corresponding "display" field with the values only delineated by a comma or other charcter, why not use a substitute?

I'm not sure exactly what you are trying to accomplish.

Example, code = AA, or AA"BB"CC

display= AA,BB,CC

or are you trying to get 3 seperate records of display / repeating field

AA

BB

CC

I am trying to get the result(s) into 1 repeating field

Example 1, code = AA"BB"CC

display= Apple Aaron; Bob Boy; Cory Cody

Example 2, code = AA

display = Apple Aaron

Thanks!

Posted

Are you trying to generate the results into seperate entries for the "display" field, or a repeating field? If not, and the results are generated into a single corresponding "display" field with the values only delineated by a comma or other charcter, why not use a substitute?

I'm not sure exactly what you are trying to accomplish.

Example, code = AA, or AA"BB"CC

display= AA,BB,CC

or are you trying to get 3 seperate records of display / repeating field

AA

BB

CC

I am trying to get the result(s) into 1 repeating field

Example 1, code = AA"BB"CC

display= Apple Aaron; Bob Boy; Cory Cody

Example 2, code = AA

display = Apple Aaron

Thanks!

Posted

Are you trying to generate the results into seperate entries for the "display" field, or a repeating field? If not, and the results are generated into a single corresponding "display" field with the values only delineated by a comma or other charcter, why not use a substitute?

I'm not sure exactly what you are trying to accomplish.

Example, code = AA, or AA"BB"CC

display= AA,BB,CC

or are you trying to get 3 seperate records of display / repeating field

AA

BB

CC

I am trying to get the result(s) into 1 repeating field

Example 1, code = AA"BB"CC

display= Apple Aaron; Bob Boy; Cory Cody

Example 2, code = AA

display = Apple Aaron

Thanks!

Posted

By using a Case statement with PatternCount for each code and it's result, I got it working but it only spits out the first result

Your solution seems nearly correct to me, but use a concatenation of If or Cases and not a single Case statement.

If( PatternCount(qq; x); "J.Ickx;"; "") &

If( PatternCount(qq; y); "I.Grec;"; "") &

...

The final ";" is a problem but can also be solved with some inspiration

Posted

By using a Case statement with PatternCount for each code and it's result, I got it working but it only spits out the first result

Your solution seems nearly correct to me, but use a concatenation of If or Cases and not a single Case statement.

If( PatternCount(qq; x); "J.Ickx;"; "") &

If( PatternCount(qq; y); "I.Grec;"; "") &

...

The final ";" is a problem but can also be solved with some inspiration

Posted

By using a Case statement with PatternCount for each code and it's result, I got it working but it only spits out the first result

Your solution seems nearly correct to me, but use a concatenation of If or Cases and not a single Case statement.

If( PatternCount(qq; x); "J.Ickx;"; "") &

If( PatternCount(qq; y); "I.Grec;"; "") &

...

The final ";" is a problem but can also be solved with some inspiration

This topic is 7288 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
×
×
  • Create New...

Important Information

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