Substring macro's are not working for me. Here's the format I am trying to use:
"={%headline| (substring)0;20%}"
Problem: The data that is inserted in the database is not truncated properly.
Example: I have a 'headline' string of 80 chars.
Expected result: I expect the first 20 would go into the database when using the substring macro above.
Actual result: All 80 characters are inserted into the database.
Additional info: This incorrect functionality occurrs on any text field I try to substring.
Possible theory: Perhaps one of the macros 'breaks' the parsing engine or something, and the tool just quietly swallows the exception and stops parsing the macros? I dunno, since I don't have the source for the tool, this is just a wild theory.
Disclaimer: I've been having an offline conversation with Helena on email, and I thought I'd put it here to help others!
Hi Lance,
Thank you for your reply.
I was able to reproduce the issue. It occurs if the substring should be longer than the headline string is. You can test it with macros: ={%headline|(substring)0;10%} to see that it displays data correctly. We will inspect it and let you know.
Helena
Here's my reply:
Hi Helena,
The substring macro doesn't work for me: ={%headline|(substring)0;10%}
The substringing seems to be ignored and the full length of the fields are imported. Here's an example from a .iprofile
<mapping target="articlename" source="={%headline| (substring)0;20%}" />
Am I using it incorrectly?
Thanks,
Lance