cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
chudson002
Helper IV
Helper IV

RETRIEVE DATA FROM PREVIOUS RECORD - KEEP CALCULATIONS IN TACT

Hello Community,

Talking this out to see if possible.. Have the below:

Beginning Balance         Offers Received          Offers Completed      End Balance
     100                                 20                                   40                            80

Have 2 dropdowns, Division and Month.

When the new record (month)  is added, the End Balance of 80 will auto-populate to the Beginning Balance, and the formulas

between the four columns will stay in tact for each new record.   Any ideas?

 

Thanks,

V/R

chudson002

  

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @chudson002 ,

When you press the New Record button, before the NewForm() code, set a Variable

Set(
   varEndBal,
   Value(YourEndBalanceBox.Text)
)

then have the Default of the Beginning Balance Box to

If(
   varEndBalance>0,
   varEndBalance,
   Parent.Default
)

then on your Save button for the new record after SubmitForm() put this

Set(varEndBalance,0)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @chudson002 ,

When you press the New Record button, before the NewForm() code, set a Variable

Set(
   varEndBal,
   Value(YourEndBalanceBox.Text)
)

then have the Default of the Beginning Balance Box to

If(
   varEndBalance>0,
   varEndBalance,
   Parent.Default
)

then on your Save button for the new record after SubmitForm() put this

Set(varEndBalance,0)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Good Evening Warren, 

This is a monthly report where 5 departments have to submit data (please see below).

Put the code on the Default for the Beginning Balance of three categories

Put SubmitForm(Form); Set(varEndBalance,0); Navigate(Success) on the Submit Button. 

The Divisions are the trigger.   When a Division is selected, how will the form know to pull the data from

the last entry of that specific Division selected?
I am stuck on the first step NewForm() (worked backwards).   Can't see where that is at.

The entries are made within SharePoint.  The form shows when +New is selected. 

 

chudson002_1-1604979776578.png

 

Thanks for all your assistance.

 

V/R

chudson002

 

 

 

 

Hi @chudson002 ,

I am a little lost here - your question was how to transfer the end balance of a form to the beginning balance of a new form? I suggested making a Variable and then defaulting the new form beginning balance to that. You will have the balance before you submit the form (as displayed on your first post) - or am I missing something?

Worked perfectly.

 

Thanks as always.

 

V/R

chudson002

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,815)