Forum Discussion
PushpakumarGna1
6 years agoQrew Assistant Captain
Hi Evan,
Basically , i have a string and i need to write to four variables
For example , String="N|LT|01|2021,02,25 ; N|NLT|01|2021,02,25 ; Y|LT|01|2021,02,25 ; Y|LT|02|2022,02,25 ; Y|LT|03|2023,02,25 ; Y|NLT|04|2019,02,23 ;"
N_LT = "N|LT|01|2021,02,25 ;"
N_NLT="N|NLT|01|2021,02,25 ;"
Y_LT="Y|LT|01|2021,02,25 ; Y|LT|02|2022,02,25 ; Y|LT|03|2023,02,25 ;"
Y_NLT="Y|NLT|04|2019,02,23 ;"
Basically i am looking for "for" loop which will traverse the string one by one based on delimiter and check the first and second parameter and put that in the respective string.
can you please provide me some suggestions.
Thanks
------------------------------
Pushpakumar Gnanadurai
------------------------------
Basically , i have a string and i need to write to four variables
For example , String="N|LT|01|2021,02,25 ; N|NLT|01|2021,02,25 ; Y|LT|01|2021,02,25 ; Y|LT|02|2022,02,25 ; Y|LT|03|2023,02,25 ; Y|NLT|04|2019,02,23 ;"
N_LT = "N|LT|01|2021,02,25 ;"
N_NLT="N|NLT|01|2021,02,25 ;"
Y_LT="Y|LT|01|2021,02,25 ; Y|LT|02|2022,02,25 ; Y|LT|03|2023,02,25 ;"
Y_NLT="Y|NLT|04|2019,02,23 ;"
Basically i am looking for "for" loop which will traverse the string one by one based on delimiter and check the first and second parameter and put that in the respective string.
can you please provide me some suggestions.
Thanks
------------------------------
Pushpakumar Gnanadurai
------------------------------
DonLarson
6 years agoQrew Elite
Pushpakumar,
I am assuming you have a field of data that you want to become four new fields. If the user or some other source populates the first field, then individual formulas in four other fields can each evaluate the first field.
If your source is
[Source]="1,2,3,4"
Each individual field is defined:
[Field One]= Left([Source],1) Which would return "1"
[Field Two]= Left([Source],"'") Which would return "2"
[Field Three]= Left([Field Two],"'") Which would return "3"
[Field Four]= Right([Source],1) Which would return "4"
The way you are parse, trim and cut up your source depends on the source format. There is no way to natively write a single loop that will populate the four new fields.
------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------
I am assuming you have a field of data that you want to become four new fields. If the user or some other source populates the first field, then individual formulas in four other fields can each evaluate the first field.
If your source is
[Source]="1,2,3,4"
Each individual field is defined:
[Field One]= Left([Source],1) Which would return "1"
[Field Two]= Left([Source],"'") Which would return "2"
[Field Three]= Left([Field Two],"'") Which would return "3"
[Field Four]= Right([Source],1) Which would return "4"
The way you are parse, trim and cut up your source depends on the source format. There is no way to natively write a single loop that will populate the four new fields.
------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------
- PushpakumarGna16 years agoQrew Assistant Captainthanks a lot for the reply. I will try and get back to you in case of any queries.
Thanks
------------------------------
Pushpakumar Gnanadurai
------------------------------- DonLarson6 years agoQrew ElitePushpakumar,
The process I laid out there will work but I made an error with my Field Three formula. I was moving too fast too early in the day and did not test.
------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------