cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kgreen8790
Advocate II
Advocate II

can output of join be concatenated with additional text in single expression?

In my chatbot the user can request assistance with a technical issue. The bot gathers input from the user and calls an action where the users input is checked against a couple of conditions to return results from a skills matrix to pair them with help in their region and with the desired skillset. All of this works fine. The current bug I'm working through with this is getting the flow to remove my email from the list of emails if I happen to be the user (since I get added to every chat the bot creates due to my profile being used to create the chats). I think I have the solution but when I try to add it as an expression I continue to get "the expression is invalid" error. Here is my expression: 

if(equals(outputs('Get_user_profile_(V2)')?['body/mail'], 'bot.me@email.com'), join(body('Filter_array_Equip_Type')?['Email'], ';')), concat(join(body('Filter_array_Equip_Type')?['Email'], ';'), ';', outputs('Get_user_profile_(V2)')?['body/mail']))

My only guess is concat may not be compatible with join somehow? I tried searching the interwebs but found no mention of if these two functions play nicely together. So, I'm bringing it to the forums to see if anyone here knows if these two are compatible or if I need to find a different expression.

1 ACCEPTED SOLUTION

Accepted Solutions
kgreen8790
Advocate II
Advocate II

I swear, at this point I'm just posting on here to jump start my own problem solving abilities. The last three posts I've done have led to me figuring out the solution just a few moments after posting the question. Something about putting it on here for the world to see makes me look at my code/process more critically and then I end up solving it. I'll leave this here along with the solution in case anyone else runs into this problem. 

My issue was the double closing parenthesis on at the end of the first join function and I had to use select function to grab emails from array first. Totally spaced there I guess. Here is the correct code for this solution.

 

 

if(equals(outputs('Get_user_profile_(V2)')?['body/mail'], 'Kevin.Green@convergint.com'), join(body('Select'), ';'), concat(join(body('Select'), ';'), ';', outputs('Get_user_profile_(V2)')?['body/mail'][0]))

 

View solution in original post

1 REPLY 1
kgreen8790
Advocate II
Advocate II

I swear, at this point I'm just posting on here to jump start my own problem solving abilities. The last three posts I've done have led to me figuring out the solution just a few moments after posting the question. Something about putting it on here for the world to see makes me look at my code/process more critically and then I end up solving it. I'll leave this here along with the solution in case anyone else runs into this problem. 

My issue was the double closing parenthesis on at the end of the first join function and I had to use select function to grab emails from array first. Totally spaced there I guess. Here is the correct code for this solution.

 

 

if(equals(outputs('Get_user_profile_(V2)')?['body/mail'], 'Kevin.Green@convergint.com'), join(body('Select'), ';'), concat(join(body('Select'), ';'), ';', outputs('Get_user_profile_(V2)')?['body/mail'][0]))

 

Helpful resources

Announcements
Power Virtual Agents News & Announcements

Power Virtual Agents News & Announcements

Keep up to date with current events and community announcements in the Power Virtual Agents community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Virtual Agents Community Blog

Power Virtual Agents Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,754)