HI all,
I am hoping for some help as I can't figure out where I have gone wrong with this one:
Creating a Name Change option on a powerapp and if the change is back dated I need an error message to show, but if today or future dated change then it needs to patch a tracker for changes to be submitted to a central team, then make the name change overlay not visible.
If( IC_NC_Dat.SelectedDate>=Today(),
Patch ('Requested Changes Trackers',
Defaults('Requested Changes Trackers'),
{'Effective Date':IC_Eff_Dat_Pick.SelectedDate},
{'Employee Number': varIndEmp},
{Name: IC_NN_Home.Text},
{'Change Type': Text("Name Change")
) &&
Reset(IC_Eff_Dat_Pick) && Reset(IC_NN_Home) && Set(varShowNamChan,false),
Set (varErrMess, true));
I am new to powerapps still so any help is appreciated.
Many thanks
Cat
If(IC_NC_Dat.SelectedDate<Today(),
Notify("Date must be today or later", Error),
Patch ('Requested Changes Trackers',
Defaults('Requested Changes Trackers'),
{'Effective Date':IC_NC_Dat.SelectedDate},
{'Employee Number': varIndEmp},
{Name: IC_NN_Home.Text},
{'Change Type': Text("Name Change")
} );
Reset(IC_NC_Dat);
Reset(IC_NN_Home);
Set(varShowNamChan,false);
Set (varErrMess, true)
)
Hi Thanks for this - I need the reset and to make the screen not visible only if the error is not shown.
Can we do that please?
Hi @KitCat,
If(
IC_NC_Dat.SelectedDate>=Today(),
Patch(
'Requested Changes Trackers',
Defaults('Requested Changes Trackers'),
{
'Effective Date':IC_NC_Dat.SelectedDate,
'Employee Number': varIndEmp,
Name: IC_NN_Home.Text,
'Change Type': "Name Change"
}
),
Set (varErrMess, true)
);
Reset(IC_NC_Dat);
Reset(IC_NN_Home);
Set(varShowNamChan,false)
As an update I have amended some errors I have found but it has not stopped throwing the errors. Please see below for amended code:
If( IC_NC_Dat.SelectedDate>=Today(),
Patch ('Requested Changes Trackers',
Defaults('Requested Changes Trackers'),
{'Effective Date':IC_NC_Dat.SelectedDate},
{'Employee Number': varIndEmp},
{Name: IC_NN_Home.Text},
{'Change Type': Text("Name Change")
) &&
Reset(IC_NC_Dat) && Reset(IC_NN_Home) && Set(varShowNamChan,false),
Set (varErrMess, true));
WarrenBelz
146,660
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,004
Most Valuable Professional