Planned
Add string.right Handlebar helper
Struggled with the syntax to define a helper signature... maybe:
right(string, number) : string
I just completed a requirement to only use the last n characters of a string, this is what it looks like :(
"value": "OUR_REF:
{{substring bill_of_lading
(subtract bill_of_lading.length
@root.settings.import.BOLRefLength) bill_of_lading.length}}"
It's not unlike what is needed for any language lacking left/right substring support, but it would be so much cleaner to be able to write:
"value": "OUR_REF:{{right bill_of_lading @root.settings.import.BOLRefLength}}"
UPDATE: I had to do this a few more times so I tried hacking the substring helper and found that an end index < start index will yield right semantics.
{{substring "Maiden Rules" 100 5}} -> "Rules"
I still think a right helper is needed, but thought I'd share this hack.
1
Comments
Thanks for the request, Steve Klett. Our product managers do monitor this channel and appreciate specific examples like you provided.
To others reading this: Please "vote" on the enhancement if you agree and provide any additional feedback. We love to hear from you!
Hi Steve Klett,
Thanks for sharing this. We see that whitespace and formatting is something that people can have a hard time with. We're looking at how we could make this easier to read and write. We're kind of limited since handlebars.js is a third-party tool, but we welcome other ideas on how we could make this easier!
Hi Courtney,
If you are referring to my comment
I only meant I was having a hard time coming up with a concise and clear syntax to describe the function I'm requesting; it's a problem with me and my little brain, not anything with Celigo. :)
Hello Steve,
Thank you for sharing the feedback. This sounds like a good enhancement to improve user experience. I have added this to the product backlog to keep track of it !!
Best Regards
Please sign in to leave a comment.