Skip to main content

Notifications

Community site session details
Power Apps - Building Power Apps
Answered

Create a collection from a custom gallery

Like (0) ShareShare
ReportReport
Posted on 16 Apr 2021 01:00:55 by 66

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

 

  • Verified answer
    v-albai-msft Profile Picture
    on 20 Apr 2021 at 02:08:52
    Re: Create a collection from a custom gallery

    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

  • CP0822 Profile Picture
    66 on 19 Apr 2021 at 16:36:57
    Re: Create a collection from a custom gallery

    Hi @v-albai-msft 

     

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

     

    Many thanks.

  • v-albai-msft Profile Picture
    on 19 Apr 2021 at 09:24:49
    Re: Create a collection from a custom gallery

    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 Profile Picture
    66 on 16 Apr 2021 at 16:30:23
    Re: Create a collection from a custom gallery

    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?

  • CP0822 Profile Picture
    66 on 16 Apr 2021 at 16:28:52
    Re: Create a collection from a custom gallery

    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

     

  • v-albai-msft Profile Picture
    on 16 Apr 2021 at 03:55:52
    Re: Create a collection from a custom gallery

    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

  • Jagadeeshk Profile Picture
    457 on 16 Apr 2021 at 01:10:01
    Re: Create a collection from a custom gallery

    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 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,079 Most Valuable Professional

Leaderboard