View this page in the latest version of Appian. a!rightb() Function Share Share via LinkedIn Reddit Email Copy Link Print On This Page Returns a specified number of bytes from the text, starting from the last byte. The a!rightb() function works the same way as a!leftb(), but extracts bytes from the end of the text instead of the beginning. Parameters a!rightb( text, num_bytes, encoding ) Keyword Type Description text Text The text from which the substring will be taken. num_bytes Number The length in bytes of the subtext to extract, counting from the end of the text. encoding Text The character encoding to use when counting bytes. The value must be a valid Preferred MIME Name from the IANA character sets registry. For example, UTF-8, Shift_JIS, or GBK. Default: UTF-8. Returns Text Using the function The following sections cover important details about the a!rightb() function. Using the encoding parameter The a!rightb() function counts bytes using the encoding specified in the encoding parameter. When working with multi-byte character sets such as UTF-8 or Shift_JIS, characters can occupy more than one byte. Specifying the correct encoding ensures the function extracts the expected substring without splitting a multi-byte character. The encoding value must be a valid Preferred MIME Name from the IANA character sets registry. If omitted, the function uses UTF-8. Examples The following examples demonstrate the a!rightb() function. To experiment with examples, copy and paste the expression into an expression rule and click TEST RULE to see the output. a!rightb("Boston",3) returns ton a!rightb("日本語", 4, "Shift_JIS") returns 本語 Feature compatibility The table below lists this function's compatibility with various features in Appian. Feature Compatibility Note Portals Compatible Offline Interfaces Compatible Sync-Time Custom Record Fields Compatible Can be used to create a custom record field that only evaluates at sync time. Real-Time Custom Record Fields Incompatible Custom record fields that evaluate in real time must be configured using one or more Custom Field functions. Process Reports Compatible Process Events Compatible Can be used to configure a process event node, such as a start event or timer event. Process Autoscaling Compatible Can be used in autoscaled processes. Event Consumer Filter Conditions Compatible Can be used in filter conditions. Event Consumer Event Handlers Compatible Can be used in event handler expressions. Feedback Was this page helpful? SHARE FEEDBACK Loading...