cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Humanity
Helper V
Helper V

Saving to wrong table

Natural Gas Bill Recorder (I'm not done coding the totals buttons because I'm having a Save Button issue....

 

I set the year... that works.

Can update every years month of January... that works.

 

BUT... Change the month & it saves all other months into Year #3???

 

w.PNG

 

 

 

 

I use these 3 buttons to set the year:

z.PNG

 

 

 

 YEAR BUTTON 2018 : ONSELECT

Set(GasYear,"3");

UpdateIf(NG1,GasMonth="January",

{Year:'Year Dropdown'.Selected.'Garage Walls Attached'});

UpdateIf('Natural Gas 2',GasMonth="January",

{Year: 'Year Dropdown'.Selected.'Garage Walls Attached'});

UpdateIf('Natural Gas 3',GasMonth="January",

{Year:'Year Dropdown'.Selected.'Garage Walls Attached'})

 

 

GALLERY : Items

If(GasYear="1",NG1,If(GasYear="2",'Natural Gas 2',If(GasYear="3",'Natural Gas 3')))

 

GALLERY - Snapshot

Y.PNG

 

GALLERY - LABEL (Blue Months Above) : OnSelect

ThisItem.GasMonth

 

SAVE BUTTON : ONSELECT

x.PNG

If(
Gallery1.Selected.Year = "1",
UpdateIf(
NG1,
Gallery1.Selected.GasMonth = GasMonth,

{
Provider: 'NG Provider'.Text,
Cost_GJ: 'NG Cost'.Text,
Monthy_GJ: 'NG How Many'.Text,
Admin_Fee: 'NG Admin'.Text,
Delivery_Fee: 'NG Delivery'.Text
}
),
If(
Gallery1.Selected.Year = "2",
UpdateIf(
'Natural Gas 2',
Gallery1.Selected.GasMonth = GasMonth,
{
Provider: 'NG Provider'.Text,
Cost_GJ: 'NG Cost'.Text,
Monthy_GJ: 'NG How Many'.Text,
Admin_Fee: 'NG Admin'.Text,
Delivery_Fee: 'NG Delivery'.Text
}
),
(UpdateIf(
'Natural Gas 3',
Gallery1.Selected.GasMonth = GasMonth,
{
Provider: 'NG Provider'.Text,
Cost_GJ: 'NG Cost'.Text,
Monthy_GJ: 'NG How Many'.Text,
Admin_Fee: 'NG Admin'.Text,
Delivery_Fee: 'NG Delivery'.Text
}
) )
)
)

 

 

 

 

0 REPLIES 0

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,075)