cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Solution Sage
Solution Sage

Re: An array formed with a subarray value

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

Re: An array formed with a subarray value

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

Re: An array formed with a subarray value

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

Highlighted
Solution Sage
Solution Sage

Re: An array formed with a subarray value

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

Highlighted
Frequent Visitor

Re: An array formed with a subarray value

Yes Mike8,

It works ! 🙂

Thanks a lot ! Thank you ! 🙂

 

 

Highlighted
Solution Sage
Solution Sage

Re: An array formed with a subarray value

🙂

Highlighted
Advocate II
Advocate II

Re: An array formed with a subarray value

it does not work for  me 😞 

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

Highlighted
Solution Sage
Solution Sage

Re: An array formed with a subarray value

Hello TOPDHI,

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (3,858)