Hello,
i have two issue with business phone in Get users profil
For my welcome mail i need to give if the phone number is a direct line or only interne line.
A Business phone number with 10 characters is a direct line, a Business phone with only 4 characters is only a interne line.
in my message i need to write :
Business Phone {Variable Directe or Interne} : 04 72 10 30 29 or only 20 39
How to create this variable for write direct or interne ? i think i can use if Business phone number > 4 characters, but how to do this ?
Need help please
Perfect, TYVM
Hi @GreguS,
That Business Phones field can contain multiple phone numbers, that is why it is displayed as an array and not as regular text (string).
You can retrieve the first phone number from that array by using an expression with the first function like below:
first(outputs('Get_user_profile_(V2)')?['body/businessPhones'])
You can use a length function (and combine it with if, equals and concat functions) to check how many characters the phone number has and display if it is a direct line or an internal number. I am also using a replace to remove white spaces of the number (makes counting the numbers of the phone number a bit easier).
if(equals(length(replace(first(outputs('Get_user_profile_(V2)')?['body/businessPhones']), ' ', '')), 4), concat('Business Phone Interne: ', first(outputs('Get_user_profile_(V2)')?['body/businessPhones'])), concat('Business Phone Direct: ', first(outputs('Get_user_profile_(V2)')?['body/businessPhones'])))
Tomac
986
Moderator
stampcoin
699
Super User 2025 Season 2
Riyaz_riz11
577
Super User 2025 Season 2