Hi,
We have line data in the form of “Bryan L Smith - Apr 15 2024 - deliverable” and I need to split it into separate columns of “Bryan L Smith” “Apr 15 2024” “deliverable”
How can I do this?
Thank you!
Hi,
We have line data in the form of “Bryan L Smith - Apr 15 2024 - deliverable” and I need to split it into separate columns of “Bryan L Smith” “Apr 15 2024” “deliverable”
How can I do this?
Thank you!
Hi Nicky,
to retrieve the values between the ‘-’ signs, you can use the following XPath expressions:
For the first one:
substring-before(@Name,’ -')
For the second one:
substring-before(substring-after(@Name,‘- ‘),’ -’)
For the third one:
substring-after(substring-after(@Name,‘-’),'- ')
Please replace @Name with the actual name of your variable.
You can now use these expressions inside your field tagging elements.
Let us know if you have more questions.
Greetings!
Gosh… the more I work with this the more I love it. Thank you!!
Glad you like our product, Nicky.
Have a great day ahead!
Hi @Nicky ,
You can do that by utilising replace() function and a $lf variable that is used instead of encoded characters ( ):
replace(@PMIPDescription, $lf, ’ ')
Just make sure to insert correct path for the field as the first parameter.
HI Semir,
Thank you… I’m not getting this to work though. I’ve tried various combinations on the If statement, and although the string is accepted, the field remains empty.
I’ve attached the .ddsp and template files.
PTIN0025176 - AECPMIPPSAProjInvoice.PMIPProjectInvoicing.ddsp (310.0 KB)
PTIN0025176_editing_v1.docx (98.5 KB)
Hi @Nicky,
I have checked your report template, and the reason this did not work is because you have used the replace function inside the If tagging element. The result of this function was therefore a string.
This is the function you are looking for in your
substring-after(substring-after(replace(@PMIPDescription, $lf, ''),'-'),'- ')
I am attaching the report template I have edited for you - you can check the solution there as well.
I don’t know what is the purpose for which you have added the If tagging element around this field tagging element so I have set it to true()
so that it always shows the content.
PTIN0025176_editing_v1 (Edited).docx (96.5 KB)