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

An array formed with a subarray value

Good morning,

I will briefly explain my problem. I'm using a gallery to collect data.

 

And on the "onSelect" of a button I use someting like :

ClearCollect(CollectionNeeded; ShowColumns(Gallery.AllItems; "new_name";"new_nombre"))

 

And it works, but I want to add some number, and I don't manage how to do it.

In each Item of my Gallery, I've inserted a "textInput".

 

But if I write : ClearCollect(CollectionNeeded; ShowColumns(Gallery.AllItems; "new_name";"new_nombre","textInput"))

 

In my Collection, the last object is not the value of my Input, but an array with ["Text" ; "HintText"; Acess....]

So my question, how to make appear the "Text" of my TextInput ?

(As the column labels are between " ", I cannot write : "TextInput.Text", it returns an error)

I've tried yet a lot of unsuccessful things, so if you have some Ideas,... Thank you !

Sabrina 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello Sabvalbra,

Could you try this and let me know if it works..

ClearCollect(CollectionNeeded, ForAll(Gallery.AllItems,{new_name:new_name,new_number:new_number,NumberOfItems:TextInput.Text}))

View solution in original post

7 REPLIES 7
Sienna
Memorable Member
Memorable Member

Hi Sabrina
Any chance to make some pictures what would explain what exactly you are trying to do.
Thanks
Sabvalbra
Frequent Visitor

Thank you Sienna for answering me so quickly !

(I'm sorry, but I cannot manage to add a picture... :-(, Darg and Drop doesn't work, copy paste neither and when I click on a picture, I don't know what to put in Source, Image description and Dimensions... )

 

The Idea, is I have my product entity from Dynamics and I import it through a Gallery.

So I have my list of products in a gallery with 2 fields shown on the screen : The name of the product and the number of the product : "new_name", "new_nombre".

 

I want my customer to write a number inside the rectange of each product to tell me how many of each product he wants ("numberOfItems" that is a "textInput" field in PowerApps.

 

And then I would like to create an array with ["new_name"; "new_number" ; "NumberOfItems"]


But when I do that with the command :
ClearCollect(CollectionNeeded; ShowColumns(Gallery.AllItems; "new_name";"new_nombre","NumberOfItems"))

The last column ("NuberOfItems") it's not just the entered number, it looks like an array. And when I click on it. I have more data like "Text", "Default", "HintText".

I hope it is clearer now...

Hello Sabvalbra,

Could you try this and let me know if it works..

ClearCollect(CollectionNeeded, ForAll(Gallery.AllItems,{new_name:new_name,new_number:new_number,NumberOfItems:TextInput.Text}))

View solution in original post

Sabvalbra
Frequent Visitor

Yes Mike8,

It works ! 🙂

Thanks a lot ! Thank you ! 🙂

 

 

🙂

it does not work for  me 😞 

Whatever I do, still arrays in defined columns. Any help ?

Hello TOPDHI,

What is different in your case?
Can you please give some information on what you need to do?

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (87,726)