cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

Add a background counter to a successful update of edit form

I am trying to keep track of the number of fire department incidents a volunter shows up to.  I am using SQL tables.

 

I created a standard Canvas App from data pointing to [dbo].[Incident] - containing columns - Date, MemberID, DepartmentID, ZoneID (this indicates if the member is in the Staging Zone, Fire Zone, etc..), Comments.  A screen shot of the Edit Form is attached.

 

The Item for the ID fields are set for the appropriate datasourse for each field  - example:  ShowColumns('[dbo].[Member]',"MemberName","MemberID" _) 

 

The Defaults for the ID for the appropriate datasourse for each field  -  Example :If(EditForm1.Mode=FormMode.Edit, LookUp('[dbo].[Member]',MemberID=ThisItem.MemberID,MemberName), LookUp('[dbo].[Member]',MemberID= 1 ,MemberName))

 

[dbo].[member] contains a counter column that has default set as zero, since the member table will be completed before the app is published.

 

So on the succesful update of the edit form, I want to udpate the counter column in [dbo].[member] to increase by 1.  But I only want to updated the field if the record is a new record in [dbo].[incident] table, not if I am updating an existing record to move the member to a different zone.

 

Hope that makes sense.

 

 

 

 

 

 

 

0 REPLIES 0

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (92,527)