cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TPAd_Admin
Frequent Visitor

ON CHANGE, COMBO-BOX SELECTED VALUE TO SET THE DefaultSelectedItems of ANOTHER COMBO BOX

New selection in one combo-box (Lookup field) to reset the defaultSelectedItems in another combo-box (Lookup field)

My Source fields:

TPAd_Admin_0-1596213007341.png

 

TPAd_Admin_1-1596213007342.png

(The text input box is to verify the values of my global variables)

Global Variables:

OnVisible: (I know hard coded…)

Set(varCustomerCname,"Carol Hall"); Set(varCustomerCid,"cC-00002");Set(varCustomername,"Ameritrust"); Set(varCustomerid,"c-00001")

 

I want to set the selected item of Customer Contact Name to the first record in Customer Contacts that matches the NEW Customer ID.

 

I DON’T KNOW HOW TO SET THESE FIELDS WITHOUT HARD-CODING. I WANT TO USE THE CUSTOMER ID TO GET THE NEW CUSTOMER CONTACT NAME!

 

Combo-box 1, DataCardValue8, Customer Name

OnChange:

Set(varCustomerCname, "Susan");Set(varCustomerid, DataCardValue8.Selected.'Customer ID');Set(varCustomername, DataCardValue8.Selected.'Customer Name');Reset(TextInput1)

(Everything works, but I want to use the Customer ID instead of --Set(varCustomerCname, "Susan")

 

Combo-box 2, DataCardValue15, Customer Contact Name

DefaultSelectedItems:

If(

   ReqEditForm.Mode = FormMode.New,

   First(Filter(TblCustomerContacts, 'Customer Contact Name'= varCustomerCname)),Parent.Default)

TPAd_Admin_2-1596213007344.png

 

0 REPLIES 0

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,047)