web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch only if combobox...
Power Apps
Unanswered

Patch only if combobox not on default value

(0) ShareShare
ReportReport
Posted on by 25

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.

 

KitCat_0-1677588212616.png

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

 

 

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard