I hope this makes sense
I have a payroll feed that sends 9 items in one field. Field name is worktags. I need to parse out the data. I have this so far
EarningDeductionCode: Trim(Mid([worktags],InStr(1,[worktags],"Deduction (Workday Owned):")+27, 25)
So the 25 at the end of the code is just a placement item, as that is the part I cannot figure out.
In order to se the length in my Mid Function I need to replace the "25" with code that will calculate the variable length answer.
There is a carriage return CHR$(10) at the end of each item. So I need to replace the "25" with code that will look for the first carriage return after (for this example) "Deduction (workday Owned): Medicare (ER) [USA]"
Once I figure this out it will work for all 9 items
Business Unit:
Cost Center:
Deduction (Workday Owned):
Employee:
Job Profile:
Location:
Pay Group:
Position:
Category:
the string looks like this (just remember there is a CHR$(10) after each item
so after "Business Unit: IT" there is a carriage return
after "Cost Center: IT HR & Admin Solutions - 68045" there is a carriage return
etc. etc.
Actual data string in field "worktags"
Business Unit: ITCost Center: IT HR & Admin Solutions -68045Deduction (Workday Owned): Medicare (ER) [USA]Employee: John Doe (111015)Job Profile: IT BUSINESS ANALYST IILocation: Wigets - Norcross OfficePay Group: M1APosition: P00001333 IT BUSINESS ANALYSTRun Category: Regular
I have a payroll feed that sends 9 items in one field. Field name is worktags. I need to parse out the data. I have this so far
EarningDeductionCode: Trim(Mid([worktags],InStr(1,[worktags],"Deduction (Workday Owned):")+27, 25)
So the 25 at the end of the code is just a placement item, as that is the part I cannot figure out.
In order to se the length in my Mid Function I need to replace the "25" with code that will calculate the variable length answer.
There is a carriage return CHR$(10) at the end of each item. So I need to replace the "25" with code that will look for the first carriage return after (for this example) "Deduction (workday Owned): Medicare (ER) [USA]"
Once I figure this out it will work for all 9 items
Business Unit:
Cost Center:
Deduction (Workday Owned):
Employee:
Job Profile:
Location:
Pay Group:
Position:
Category:
the string looks like this (just remember there is a CHR$(10) after each item
so after "Business Unit: IT" there is a carriage return
after "Cost Center: IT HR & Admin Solutions - 68045" there is a carriage return
etc. etc.
Actual data string in field "worktags"
Business Unit: ITCost Center: IT HR & Admin Solutions -68045Deduction (Workday Owned): Medicare (ER) [USA]Employee: John Doe (111015)Job Profile: IT BUSINESS ANALYST IILocation: Wigets - Norcross OfficePay Group: M1APosition: P00001333 IT BUSINESS ANALYSTRun Category: Regular