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
Mike8
Memorable Member
Memorable Member

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...

Mike8
Memorable Member
Memorable Member

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 ! 🙂

 

 

Mike8
Memorable Member
Memorable Member

🙂

it does not work for  me 😞 

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

Mike8
Memorable Member
Memorable Member

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 Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,574)