Skip to main content

Notifications

Power Apps - Microsoft Dataverse
Suggested answer

Converting accented characters

(0) ShareShare
ReportReport
Posted on by
So, correct me if I'm wrong, but I couldn't find any way to convert accented characters other than humongous pieces of code and formulas that 90% of the time just don't work?
In MS SQL I can use TRANSLATE. But in Dataverse, everything that I find is to use Power Automate, or use substitute (which never works).

Thanks for the help.
Categories:
  • Suggested answer
    Mark Nanneman Profile Picture
    Mark Nanneman 374 on at
    Converting accented characters
    It is annoying that Power Automate doesn't have a function to convert strings to HTML friendly text.

    In Power Automate I liked to use Fetch XML queries (as opposed to OData filters) to filter Dataverse rows that might have a single quote ( ' ) in the name.  It will unfortunately still break if there are certain other reserved characters (like say an ampersand or a double quote).  For those I use a couple replace actions to convert them to HTML entity equivalents.

    Basically a formual like this works 99% of the time:
    replace(
        replace(
          replace(
            replace(triggerBody()?['text'], '&', '&'),
            '<', '&lt;'
          ),
          '>', '&gt;'
        ),
        '"', '&quot;'
    )
     
     
    You can create your Fetch XML search by opening the table in question in a Model Driven App and clicking "Edit filters"

    Then write something like this (I put a placeholder in {{ just so it's easier to find in the final XML).
     
    Click "Download FetchXML and open it in a notepad, then copy and paste it in your flow.
     
    Replace the placeholder variable with a dynamic reference.  Here I just drop in a compose action that does the replace functions for ampersands etc.
    Example, searching for A&W
     
    Hope that helps!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,867

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,174

Leaderboard

Featured topics