cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sajarac
Level 8

Incremental Value

Hi there, quick question here:

 

I have a collection connected with my Share point list, in that collection I am taking several pictures, what I would like to achive is have a label "Defaul value = 1" and once a new picture is added to the collection the label value increments in 1, and once I patch the collection I would like to reset the counter to default 1

 

Could someone point me in the righ direction?

 

Thank in advance

 

Regards.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Incremental Value

Hi @sajarac,

 

This can be achieved following below steps:

1. Set the OnVisible property of the current screen to:

Set(V,1)

2. Set the OnSelect property of the button that is used to add pictures to collection to:

Collect(...); UpdateContext({V:V+1})

3. Set the Default property of the label to:

V

4. Set the OnSelect property of the button that is used to Patch the collection to:

Patch(...); UpdateContext({V:1})

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
aprildunnam
Level 10

Re: Incremental Value

How are you adding images to the collection?  Are you using the Camera control, Add Image Control or Attachments?

sajarac
Level 8

Re: Incremental Value

Hello there, and thank you very much for your prompt reply.

 

Yes I am adding pictures to my collection

Community Support Team
Community Support Team

Re: Incremental Value

Hi @sajarac,

 

This can be achieved following below steps:

1. Set the OnVisible property of the current screen to:

Set(V,1)

2. Set the OnSelect property of the button that is used to add pictures to collection to:

Collect(...); UpdateContext({V:V+1})

3. Set the Default property of the label to:

V

4. Set the OnSelect property of the button that is used to Patch the collection to:

Patch(...); UpdateContext({V:1})

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (4,833)