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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

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.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,294)