cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jamie2
Helper I
Helper I

'Expected Text Value' on Gallery label

Hi,

 

I have connected to a power automate flow in a power app and created a collection. I have checked the collection in power apps and I can see its returning the correct data. I have used a flow because I'm trying to consume an Open API and JSON in Power Apps.

 

The data in the collection is a list of purchase orders, PO date, number etc from an ERP database.

 

When I add a gallery I have set it to use the collection mentioned above. However, when I try to add a label in the gallery for the purchase order number for example I get the error shown below - 'Expected Text Value'

 

The autocomplete finds the collection item as I’m typing so not sure what the issue is. 

 

When looking at the collection the data is on sub table shown on the 2nd screen shot, not sure if this is relevant.

 

Jamie2_1-1631541605144.png

 

Jamie2_2-1631542115925.png

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Thanks, managed to solve using the suggestion below on this topic: https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-access-nested-table-values/m-p/314208...

 

Do you want to access the values within the dll column in your AddedActivity collection?

Have you solved your problem?

 

If you want to access the values within the dll column directly in your AddedActivity collection, please consider take a try with the following workaround:

Add a button control within your app, set the OnSelect property to following:

Clear(ActivityCollection);
ForAll(
           AddedActivity,
           Collect(
                     ActivityCollection,
                     dll
           )
)

then within your app, you could use the ActivityCollection as data souce to access your Activity records.

You could consider add a Gallery within your app, set the Items property to following:

ActivityCollection

then all Activity records would be displayed within the Gallery.

View solution in original post

6 REPLIES 6
zmansuri
Super User
Super User

Your purchase order list is table type data. Label expects text. try something like this:

Concat(ThisItem.PurchaseOrderList , DocumentNo)

---------------------------------------------------------------------------------------------------------------------------


Was I helpful? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. It will help other users to find it faster.

follow me on Twitter @zmansuri123,
connect with me on LinkedIn from Here

Thanks 👍 When I do that, the PO numbers are on a single Row (see below). I would like each PO number on a separate row in the gallery if that's possible? I'm a bit of a novice when it comes to Power Apps

 

Jamie2_0-1631544945308.png

 

They are in a single record. One Order has multiple document no so they can't be in a different row in gallery. If you want them in new line you can do this:

Concat(ThisItem.PurchaseOrderList , DocumentNo,"
")

after documentno when you press comma it asks for a delimiter which serrates entries. You have to provide that delimiter in double inverted comma. So write commas and put your cursor between them and press shift+Enter. So your code will look as below. This will put every doc no in new line in one gallery template

 

---------------------------------------------------------------------------------------------------------------------------


Was I helpful? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. It will help other users to find it faster.

follow me on Twitter @zmansuri123,
connect with me on LinkedIn from Here

Thanks, couldn't see any code on your reply.

 

Screen shot below shows a sample of the collection data. Essentially I want to replicate this in an app. Perhaps using a gallery is the wrong option here?

 

Jamie2_0-1631548141025.png

 

Concat(ThisItem.PurchaseOrderList , DocumentNo,"
")

 

In the delimiter section in the bold above press shift + Enter so every new doc num will be in new line. But they can not be in the different rows.

---------------------------------------------------------------------------------------------------------------------------


Was I helpful? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. It will help other users to find it faster.

follow me on Twitter @zmansuri123,
connect with me on LinkedIn from Here

Thanks, managed to solve using the suggestion below on this topic: https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-access-nested-table-values/m-p/314208...

 

Do you want to access the values within the dll column in your AddedActivity collection?

Have you solved your problem?

 

If you want to access the values within the dll column directly in your AddedActivity collection, please consider take a try with the following workaround:

Add a button control within your app, set the OnSelect property to following:

Clear(ActivityCollection);
ForAll(
           AddedActivity,
           Collect(
                     ActivityCollection,
                     dll
           )
)

then within your app, you could use the ActivityCollection as data souce to access your Activity records.

You could consider add a Gallery within your app, set the Items property to following:

ActivityCollection

then all Activity records would be displayed within the Gallery.

Helpful resources

Announcements
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 Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (5,032)