Is there a Reference Document of Data Format Functions?

Is there a reference document somewhere, preferably with some examples, of what all the Data Format functions do, especially the Text ones?

It would really help right now and save me spending time experimenting to find the option I want on each occasion.

So as an example, right now I want to grab the last 3 characters of some text… I’ve no idea how to do that!

Thanks!
Antony.

Hello Antony,
I’m afraid there is no reference for the data formatters, but especially the text ones’ names are pretty self explanatory.
If you have any question about any specific formatter, please ask.

Hi Teodor…

Thanks for your rapid reply as always! :slight_smile:

Rght now I want to grab the last 3 characters of some text… how would I do that?

Are you using the App Connect Data Formatter or the Server Data Formatter? And is this used on the page or in some server action step?

On the Server Side.

I am getting a mobile phone number from the database, but I only want to display the last 3 digits to the user.

So if the database contains 01234 567890, I want to return to the user xxxxxxxxx890.

I don’t mind too much how many xxx there are…

But for security, I need to do all of this on the Server Side and then pass either “890” or “xxxxxxxxx890” back to the client side.

Ok then, use the sub string formatter starting from character -3 (3 chars before end) with length of 3.

Screenshot_12

1 Like

Thanks Teodor!

Do these text function match specific javascript functions that I could look up the documentation of, or are they specifically dmx/wappler created?

These match Javascript functions. In your case this is the substr function: https://www.w3schools.com/jsref/jsref_substr.asp

And so to add the “xxxxx”, is it:

"xxxxxxxxxxxx" + {{contact.mobile_phone.substr(-3, 3)}}

Or use the Pad function :slight_smile:
Screenshot_13

1 Like