cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Kingpin
Kudo Kingpin

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
Highlighted
Community Support
Community Support

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
Highlighted
Impactful Individual
Impactful Individual

Re: Incremental Value

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

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Incremental Value

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

 

Yes I am adding pictures to my collection

Highlighted
Community Support
Community Support

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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (9,205)