cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Use join for a collection and need the collection values

Hello,

 

I am creating a flow that is pulling information from a sharepoint custom list when a new list item is created.  One of the list columns is a collection with 5 different possible values (the collection could contain one value or up to all 5).  My goal is to pull the values together as a single string so I can use them as an input to a MS Word Form. 

 

When I try to use the Join expression or the join action, it pulls in a significant amount of other information.  How can I pull just the values of the collection as a string?  Here is the expression I am trying to use.

 

join(triggerBody()?['CulturalBeliefs'],', ')

 

Side note, the "triggerbody" function is being auto-populated into my expression. 

 

Thank you for your time.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Regular Visitor

Re: Use join for a collection and need the collection values

Update:

 

I figured out the problem.  I didn't realize that I was pulling the entire JSON script when I was pulling the variable.  It took (more than) a few attempts, but I was able to pass the variable through a series of Data Operations to pull the data I needed.  See Flow below. 

 

The Compose function was added to put in two nested "replace" expressions to remove the brackets and quotes from the output of the "Join" action

 

This may help someone in the future to pull the data you need.  Also, would be interested if anyone has a more elegant solution.

 

JSON.png

 

View solution in original post

2 REPLIES 2
Highlighted
Regular Visitor

Re: Use join for a collection and need the collection values

Update:

 

I figured out the problem.  I didn't realize that I was pulling the entire JSON script when I was pulling the variable.  It took (more than) a few attempts, but I was able to pass the variable through a series of Data Operations to pull the data I needed.  See Flow below. 

 

The Compose function was added to put in two nested "replace" expressions to remove the brackets and quotes from the output of the "Join" action

 

This may help someone in the future to pull the data you need.  Also, would be interested if anyone has a more elegant solution.

 

JSON.png

 

View solution in original post

Highlighted
Community Support
Community Support

Re: Use join for a collection and need the collection values

Hi @Robert_H,

 

I am glad your problem has been solved!


If your problem has been solved, You could go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

Best Regards,
Community Support Team _ Lin Tu

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (3,249)