This action takes two strings - text and suffix - and returns true if text ends with suffix.
Use case: Routing files by type in an EDI/B2B integration
Suppose you have a Cleo Ruleset that monitors an inbound folder where trading partners deposit files of various types — such as invoices, purchase orders, and shipment notices — and the sole method to distinguish them is by the filename extension or a specific naming convention.
You could use EndsWith in a condition to branch your ruleset logic:
EndsWith(FileName, ".850")→ true → route to the Purchase Order processing pathEndsWith(FileName, ".856")→ true → route to the Advance Ship Notice pathEndsWith(FileName, "_INVOICE.xml")→ true → route to the Invoice transformation map
In practice, this would sit inside an If/Else or Switch-style action in CIC Studio, where EndsWith evaluates the incoming filename (or even a value pulled from inside the document, like a trailing status code in a data field) and directs the ruleset down the correct branch — without needing a full regex match just to check a suffix.
It's a lightweight way to make routing decisions based on naming conventions rather than inspecting the full file content.
Comments
0 comments
Please sign in to leave a comment.