web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Gallery In Powerapps
Power Apps
Unanswered

Gallery In Powerapps

(0) ShareShare
ReportReport
Posted on by 6

I have a gallery in powerapps where  I should be able to add records. 

Something is being weird about this a gallery , in some cases , when I try to add a new record the previous record disappear from the gallery.

I have attached a picture for better visualization . If I add a new priority metric the first time , it works perfectly but when I what to add another records (click on the + ) . sometimes the previous record disapearsPriority Metric2.png

Categories:
I have the same question (0)
  • rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    @NaghamAJ 

     

    can you please share the function you call with the (+)

     

    Consider the following

    • add icon have OnSelect = Collect(colKpi,{kpiId:Max(colKpi,kpiId)+1}) 
    • the remove icon is in the gallery with OnSelect = Remove(colKpi,ThisItem)

    Result

    Peek 2022-03-07 18-55.gif

    Hope it helps,

    R

  • NaghamAJ Profile Picture
    6 on at

    Thank you for your reply.

    This is how I am collecting the data from the gallery 

     

    Collect(
    Collection1,
    {
    PriorityMetric: MetricDropDown.Selected.KPIName,
    OfficeSite: OfficeDropDown.Selected.FieldSiteName,
    TQ1: TQ1.Text,
    TQ2:TQ2.Text,
    TQ3:TQ3.Text,
    TQ4:TQ4.Text

    }
    );

    Can you please explain why you have the +1 ? where should I add it in my code?

  • swapnilkaware Profile Picture
    35 on at

    + 1 be help you to add new record in your database 

    You can set this following formula on  the OnSelect Property

    Set(newVar,Value(Last(Milestone).Var + 1));
    NewForm(Form1); UpdateContext({varpopname:true})

  • rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    Hi @NaghamAJ your collection will do. the +1 was only for illustrative purposes as mention by @swapnilkaware to add  a record, and I use it as a unique id when i create data to work with. 

     

    ClearCollect would have cleared the collection but if you collect only like you do it is strange that they disappear. Is this still the case?

     

    R

  • NaghamAJ Profile Picture
    6 on at

    Hello ,

     

    Yes it is still the case. The thing is that, the previous sometimes disappears and I am not able to trace when .

     

    Best,

    Nagham

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 396 Most Valuable Professional

#2
11manish Profile Picture

11manish 134 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 101 Super User 2026 Season 2

Last 30 days Overall leaderboard