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

Create a collection from a custom gallery

Hi guys,

 

This is my situation, i have this gallery where I pull some data from a sharepoint list but then I have a custom textinput inside the gallery where the user have to type some info that I'm asking them

 

How can I create a collection only with this info? I should be something like this.

 

Thanks

 

Collection

C1C2C3
S42223
M42445
L63612
XL424 
XXL212 

 

Gallery

 

CP0822_0-1618534682779.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @CP0822 ,

Yes, just put the code into the OnChange property of the first TextInput control.

v-albai-msft_0-1618884449973.png

Then based on your requirement, clear this collection after patch into SP list.

Best regards,

Allen

View solution in original post

7 REPLIES 7
Jagadeeshk
Responsive Resident
Responsive Resident

Create collection means,  do you want to create local collection if so what all columns?

Or do you want to write the text ip column in sharepoint list?

If so use patch function 

v-albai-msft
Community Support
Community Support

Hi @CP0822 ,

Do you want to create a collection with all entered values in Textinput control?

If yes, you can try this method. See my example, set OnChange property of first Textinput control to:

ClearCollect(collection1,Gallery1.AllItems.TextInput1)

v-albai-msft_0-1618545227815.png

Best regards,

Allen

Hi Allen,

 

I tried your solution but I'm getting the collection like this.

 

How can I get only the value in the textinput without creating a table record?

 

CP0822_0-1618590496399.png

 

Hi,

 

I want to create a local collection and then when all the text inputs are filled patch this info in mi SP list.

 

Any ideas?

Hi @CP0822 ,

You can try this formula:

Collect(collection1,TextInput1.Text)

You can also save the Title of each record:

Collect(collection1,{Title:ThisItem.Title,Value:TextInput1.Text})

v-albai-msft_0-1618824117378.png

Best regards,

Allen

CP0822
Helper I
Helper I

Hi @v-albai-msft 

 

Where do you suggest I should set this formula? In the "On change" of the TextInput?

 

Many thanks.

Hi @CP0822 ,

Yes, just put the code into the OnChange property of the first TextInput control.

v-albai-msft_0-1618884449973.png

Then based on your requirement, clear this collection after patch into SP list.

Best regards,

Allen

View solution in original post

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

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

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (62,170)