The Text function is widely used in PowerApps and for a good reason. It converts any value to a text field to display. For numbers and dates, you can add additional parameters to format them according to any criteria.

Limitations

  1. Overall the Text function is quite complete but, since it depends on the data source, you should be careful of the size that is being imported and passed back and forward to ensure data is not lost or is stored correctly.

Recommendations:

  1. In case of converting dates, use the language placeholder defined by the language tag [$-LanguageTag] . By doing this, you’ll ensure that it’s presented correctly to the user and in a format that they understand.
  2. When presenting numbers always define the placeholders so that you’re still sure that the result is what you expect. For example, specify the number of decimal points that are displayed (be aware of rounding).
  3. For insert fields, always define the MaxLength with the value that matches the data source. You can be truncating or losing date if you don’t set the value correctly.
  4. Dates and fields can be configured to display always the same result. Although it is discouraged, if you want to do this, the Text function provides a lot of flexibility. For a full list of placeholders, check the Text function in PowerApps.

 

Localization

  1. Please note that formulas may have localization-based differences. For example, you should write RoundUp("3.14",2) with “,” separating each of the arguments, but if your localization is Portugal, you should use “;” instead.

 

Sources:

Text function in PowerApps

Back to the PowerApps Function Reference

Featured Image by Jason Leung on Unsplash

Manuel Gomes

I'm a Project Manager with experience in large projects and companies. I've worked in the past for companies like Bayer, Sybase (now SAP) and I'm currently working for Pestana Hotel Group.

View all posts by Manuel Gomes →

Leave a Reply

%d bloggers like this: