cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Split function

The below formula is being used for a collection - the 2 sources (LC Tool Kit Submissions and Business Reviewers) are both SP lists, and both contain multiple selections within.  I am having an issue with the Split function, this formula comes from piecing together a few insights from this board.  Can anyone help me understand or fix how to get my LC Toolkit Submission source, Line(s) of Business multiple selection values within become a TEXT value so the split function will work?   

 

ClearCollect(test1,ForAll(Split(First('LC Tool Kit Submissions').'Line(s) of Business', ","),Filter('Business Reviewers',Result in Split('Line(s) of Business',","))))

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Split function

Hi @enlitzinger ,

Could you please share a bit more about the 'Line(s) of Business' column? Is it a Choice type column (Allow Multiple Selections) or a Text Type column?

 

If the 'Line(s) of Business' column is Choice type column (Allow Multiple Selections) within your "LC Tool Kit Submissions" data source, I think there is something wrong with the formula that you provided -- The First('LC Tool Kit Submissions').'Line(s) of Business' formula returned is a Table value rather than a Text value, so you could not split the Choice type column value (Allow Multiple Selections) with "," operator using Split function.

 

I have made a test on my side, please consider modify your formula as below:

ClearCollect(
             test1,
             ForAll(
                    First('LC Tool Kit Submissions').'Line(s) of Business',
                    Filter(
                            'Business Reviewers',
                             Value in 'Line(s) of Business'.Value
                    )
            )
)

or

ClearCollect(
             test1,
             ForAll(
                    First('LC Tool Kit Submissions').'Line(s) of Business',
                    Filter(
                            'Business Reviewers',
                             Value in Concat('Line(s) of Business', Value & ";")
                    )
            )
)

same logic should be applied to the test2 collection, please modify your formula based on above formula, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Split function

Hi @enlitzinger ,

Could you please share a bit more about the 'Line(s) of Business' column? Is it a Choice type column (Allow Multiple Selections) or a Text Type column?

 

If the 'Line(s) of Business' column is Choice type column (Allow Multiple Selections) within your "LC Tool Kit Submissions" data source, I think there is something wrong with the formula that you provided -- The First('LC Tool Kit Submissions').'Line(s) of Business' formula returned is a Table value rather than a Text value, so you could not split the Choice type column value (Allow Multiple Selections) with "," operator using Split function.

 

I have made a test on my side, please consider modify your formula as below:

ClearCollect(
             test1,
             ForAll(
                    First('LC Tool Kit Submissions').'Line(s) of Business',
                    Filter(
                            'Business Reviewers',
                             Value in 'Line(s) of Business'.Value
                    )
            )
)

or

ClearCollect(
             test1,
             ForAll(
                    First('LC Tool Kit Submissions').'Line(s) of Business',
                    Filter(
                            'Business Reviewers',
                             Value in Concat('Line(s) of Business', Value & ";")
                    )
            )
)

same logic should be applied to the test2 collection, please modify your formula based on above formula, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Helper II
Helper II

Re: Split function

The data in Lines of Business and Products are both choice columns/allow multiple selections.  The data source is a sharepoint online list. 

 

I adjusted the formula to the first recommendation, no errors are showing.  Attached is the screenshot of what the collections look like - I assume this is correct.  Now to display the data in a gallery I was using this formula which now has errors associated after the split function was removed on the OnVisible screen.  How should I adjust this formula now that split was removed?  Error states "cannot use Table values in this context".

 

Filter('Business Reviewers','Line(s) of Business' in collection1.'Line(s) of Business','Product(s)' in collection2.'Product(s)')

 

 

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,451)