Hi all,
I have a patch command working in powerapps where a collegaue can be shown to move team/Department, etc. The options are set up as comboboxes.
This is filled with the default items, so if I change CCL's Name, but the Team Leader and Team names stay the same how can I write the patch command to just update the CCL Name and put "CCL" as the Change Type in the below code please? I have tried to do it but I am just not sure how to go about it.
If(IC_Eff_Dat_Pick.SelectedDate<Today(),
Set(varErrMess_IC,true),
Patch ('Requested Changes Trackers',
Defaults('Requested Changes Trackers'),
{'CCL Name': IC_CCL_Nam_DD.Selected.'CCL Name'},
{'Effective Date':IC_Eff_Dat_Pick.SelectedDate},
{'Employee Number': If(varSelColNamdrop=false,varIndEmp, Value(IC_Staff_No.Text))},
{Name: If(varSelColNamdrop=false, varIndNam, IC_Col_Nam_DD.Selected.'Colleague Name')},
{Role:IC_Rol_DD.Selected.Result},
{'Team Leader Name':IC_TL_DD.Selected.Result},
{'Team Name':IC_T_Name_DD.Selected.'Team Name'},
{'Contract Type':IC_Cont_Type_DD.SelectedText.'Contract Type'},
{'Contracted Hours':Value(IC_Cont_Hrs.Text)},
{'Employee Status':IC_Stat_DD.Selected.Value},
{'Full/Part Time':IC_FTPT_YN.Value},
{'Mirror Shift':IC_Mirr_Coll_YN.Value},
{'Mirror Shift Colleague Number':Value(IC_Mirr_Staff.Text)},
{'Weeks In Rotation':Value(IC_WkRot_DD.Text)},
{'Split Shifts':IC_SplitShift_YN.Value},
{'Change Type': If(IC_CCL_Nam_DD.Value <> DefaultSelectedValue, "CCL","",)
//{'Skill Sets': IC_Skills_DD}
);
Reset(IC_Col_Nam_Box); Reset(IC_Eff_Dat_Pick);Reset(IC_CCL_Nam_DD);Reset(IC_Cont_Hrs); Reset(IC_Cont_Type_DD);Reset(IC_FTPT_YN); Reset(IC_Mirr_Coll_YN);Reset(IC_Mirr_Staff);Reset(IC_Rol_DD); Reset(IC_Skills_DD);Reset(IC_SplitShift_YN); Reset(IC_Staff_No); Reset(IC_Stat_DD); Reset(IC_TL_DD); Reset (IC_T_Name_DD);Reset(IC_WkRot_DD);
Navigate(Welcome_screen_TL,Fade);)
If I am going about this in a weird and complex way please let me know that too 🙂
Many thanks
Cat

Report
All responses (
Answers (