March 9, 200520 yr Author 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!
March 9, 200520 yr 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!
March 9, 200520 yr Author 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!
March 9, 200520 yr 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.
March 9, 200520 yr 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.
March 9, 200520 yr 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.
March 9, 200520 yr Author 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!
March 9, 200520 yr Author 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!
March 9, 200520 yr Author 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!
March 9, 200520 yr 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
March 9, 200520 yr 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
March 9, 200520 yr 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
March 9, 200520 yr Author 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!
March 9, 200520 yr Author 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!
March 9, 200520 yr Author 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!
March 12, 200520 yr 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
March 12, 200520 yr 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
March 12, 200520 yr 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
Create an account or sign in to comment