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 Apps
Answered

Gallery Item + 1

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hey everyone,

 

im quite new to Power Apps and currently facing a Problem. Im trying to implement a button which should increase the value of the selected Item by 1.

 

My OnSelect Formular looks like this:

Tobias410_0-1622641503858.png

Error Message: Invaild Argument, expecting Boolean, Number, Text..

I didn't build the formular myself, i found it somewhere and tried to adapt it, but couldn't get it working. I tried to add ".value" and "ThisItem." together with the column name, but it only resulted in different errors.

 

 

Categories:
  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    Select(Parent);
    Patch(ListName,ThisItem,{Number:ThisItem.Number+1})

  • trjackson77 Profile Picture
    254 on at

    Try this:

    Set(varLeads, Value(ThisItem.<<YourField>>) + 1);

    Patch(<<YourTable>>, ThisItem, {<<YourField>>: varLeads})

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Could you please tell me that:

    1. what is your data source, SP list or Excel, and does this button exist in the Gallery?
    2. how you set the Text property of the Label  corresponding to the 'Heute zugewiesene Leades'?

    I agree with @zmansuri, here is something addition here to explain.

    I have a test on my side, please check for reference.

    Select(Parent);;
    Patch(ListName;ThisItem;{'Heute zugewiesene Leades':ThisItem.'Heute zugewiesene Leades'+1})

    Note that you should use a ";;" operator to combine the Select() with the Patch() rather than the "And".

    The And operator is used to connect two conditions and manipulate the results of comparisons and tests so that you could not use it to combine two dependent functions.

    Hope it could help you.

    Regards,

    Qi

     

     

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Sorry for my late response. Thx for all your help ! @zmansuri your version worked, but only when i replaced my 'And' with ;; thanks to @v-qiaqi-msft 

  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    Checkout my code: 

    I wrote ; at the end.

    You just need 1 ;

  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    Glad it worked out for you. Click Accept as solution if i have solved your problem. So, others can find it in future.

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
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard