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

Can't convert a field in record in a Collection to text

Hello,

 

I believe I don't quite understand this disambiguation with collections. I have a single column collection with about 4 records. I need to convert them to text and manipulate them. I have tried using disambiguation and I am still getting an Expected Text Value error.

 

Any tip would be appreciated.

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Hi @NHammond37 

Thanks for the clarification. What you are missing here is the Result property.

If you modify your formula as follows, that should resolve the problem.

First(Split(Text(ThisItem.Loc), "-")).Result

timl_0-1603485527711.png

As a point of clarification, we use disambiguation syntax when we write formula that refers to multiple data sources that contain fields with the same names. This does not apply here, so there is no need to worry about using that syntax.

View solution in original post

4 REPLIES 4
Highlighted
Super User III
Super User III

Hi @NHammond37 

Could you post the formula you're using or a screenshot of your error?

Without that starting reference, it's difficult to suggest the correction that's required to fix your problem.

Highlighted

The collection is named LocUsed, Column is named Loc

 

I've tried a few different things. Most of the values in each record are "494 - High School".

 

I tried adding a gallery with a Label with the Text property as:

Text(ThisItem.Loc)

This works fine but I am trying to get just that first number "494". So when I do First(Split(Text(ThisItem.Loc), "-")) I get an Expected Text Value error.

 

I've tried just a label with:

First(LocUsed).Loc

This gets the whole "494 - High School" but as soon as I try to manipulate the text with Text and Split I get the Expected Text value error.

 

I tried to play around with those [@Loc] disambiguation tags as well, and they work for display the whole value. But as soon as I try and get just the number in different ways. I always get the Expected Text Value error.

 

Thank you!

Highlighted

Hi @NHammond37 

Thanks for the clarification. What you are missing here is the Result property.

If you modify your formula as follows, that should resolve the problem.

First(Split(Text(ThisItem.Loc), "-")).Result

timl_0-1603485527711.png

As a point of clarification, we use disambiguation syntax when we write formula that refers to multiple data sources that contain fields with the same names. This does not apply here, so there is no need to worry about using that syntax.

View solution in original post

Highlighted

Thank you! I was playing around with the Result property at one point but obviously did not have it right. It has been a long day.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,939)