cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CindyZ
Level: Powered On

Converting a value to text when filtering a gallery from a gallery

My overall problem is that I'm trying to filter a gallery (galComments) based upon an item selected in a gallery (galRequest) on another screen.  I've tried a ton of ways to get this to work and it is a no go no matter what I do. 

 

I'd like to start here.  Can someone please help me know how to adapt this formula -- I can't seem to figure out where the conversion to text goes since I'm getting the message "The left value is a text type and the right value is a number type."

 

 Here is my formula

 Filter('Comments','Related Request for Help'.Value = galRequest.Selected.ID)

 

Comments is my Sharepoint list that has a lookup into my Requests list (ID) from the (Related Request for Help) field.

 

My galRequest shows the ID field from the Requests list. 

 

Thank you ever so much for your help on this! 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Converting a value to text when filtering a gallery from a gallery

Hi @CindyZ ,

Based on the error message that you mentioned, I think you faced a type mismatch issue with your formula.

 

Within the formula that you mentioned, the 'Related Request for Help'.Value formula returns a Text value, the galRequest.Selected.ID formula return a Number value.

 

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

Filter('Comments','Related Request for Help'.Value = Text(galRequest.Selected.ID))

Or

Filter('Comments', Value('Related Request for Help'.Value) = galRequest.Selected.ID)

Please take a try with above formula, check if the issue is solved.

 

More details about the Text function and Value function, please check the following article:

Text function, Value function

 

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.
2 REPLIES 2
Community Support Team
Community Support Team

Re: Converting a value to text when filtering a gallery from a gallery

Hi @CindyZ ,

Based on the error message that you mentioned, I think you faced a type mismatch issue with your formula.

 

Within the formula that you mentioned, the 'Related Request for Help'.Value formula returns a Text value, the galRequest.Selected.ID formula return a Number value.

 

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

Filter('Comments','Related Request for Help'.Value = Text(galRequest.Selected.ID))

Or

Filter('Comments', Value('Related Request for Help'.Value) = galRequest.Selected.ID)

Please take a try with above formula, check if the issue is solved.

 

More details about the Text function and Value function, please check the following article:

Text function, Value function

 

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.
Highlighted
CindyZ
Level: Powered On

Re: Converting a value to text when filtering a gallery from a gallery

Worked perfectly!   Also, thanks for the link to reference.  I did look at that prior to submitting my questions -- as I almost always do -- but so often that content is just greek to me until I see a real-world example.  So -- this forum is a life-saver!  

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 50 members 4,252 guests
Please welcome our newest community members: