cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TesDA
Continued Contributor
Continued Contributor

Default Combo Box not retrieving prior entry

I can't seem to get the below fields to pre-populate with how they were originally filled out. The defaults just arent working. Let me know if there is any other information I can provide.

 

They are searching and filtering on the employee name however I'm sending the employee ID back to the entity. The default should take the employee ID from the entity to translate that to the Employee Name (using the USID and Employee Name columns from PS_Emp CDS Entity) - which is where I think I'm going wrong.

 

Updates & creates rows in the CDS Entity: PS_PAF_BidPro

Form1

 

Card: Proposal_Manager_DataCard3

Allowed Values: DataSourceInfo(PS_PAF_BidPros, DataSourceInfo.AllowedValues, "crf02_proposalmanager")

Update: PropMgr_ComboBox.Selected.USID

Combo Box: PropMgr_ComboBox

DisplayFields & SearchFields: ["crf02_employeename"]

Items: Sort(Filter(PS_Emps, 'ECS ICS' = "ECS" And Title <> "Associate" And Title <> "CHAMP" And Title <> "Non Exempt Professional"), 'Employee Name')

Default: {Result: LookUp(PS_PAF_BidPros,ID_BidPro = varRecord.ID_BidPro, 'Proposal Manager')}

DefaultSelectedItems: {Result: LookUp(PS_PAF_BidPros,ID_BidPro = varRecord.ID_BidPro, 'Proposal Manager')}

 

Card: Proposal_Partner_DataCard2

Allowed Values: DataSourceInfo(PS_PAF_BidPros, DataSourceInfo.AllowedValues, "crf02_proposal_partner")

Update: PropPartner_ComboBox.Selected.USID

Combo Box: PropPartner_ComboBox

DisplayFields & SearchFields: ["crf02_employeename"]

Items: Sort(Filter(PS_Emps, Title = "Partner" Or Title = "Managing Director"),'Employee Name')

Default: {Result: LookUp(PS_PAF_BidPros,Proposal_Partner = ThisItem.Proposal_Partner, Proposal_Partner)}

DefaultSelectedItems: {Result: Proposal_Partner = ThisItem.Proposal_Partner}

 

For Both:

Reset = false

IsSearchable = true

SelectMultiple = false

OnSelect = false

OnChange = false

 

 

2 REPLIES 2
v-qiaqi-msft
Community Support
Community Support

Hi@TesDA,

 

Based on the issue you mentioned, you want to get the below fields to pre-populate with how they were originally filled out.

 

Based on the formula you provided, there is something wrong with your formula syntax.

 

The data source of the Items & DefaultSelectedItems must be consistent. Based on your needs, you want to connect to the PS_PAF_BidPro.

 

Please try to modify your formula like this:

 

{Result: LookUp(Sort(Filter(PS_Emps, Title = "Partner" Or Title = "Managing Director"),'Employee Name'),Proposal_Partner = ThisItem.Proposal_Partner, Proposal_Partner)}

 

If there is any problem, please contact me at your convenience.

 

Best Regards,

Qi Qiao

Best Regards,
Qi
TesDA
Continued Contributor
Continued Contributor

Hi, @v-qiaqi-msft 

 

It is still not working. Here is what I changed:

 

PropMgr_ComboBox:

Default:

{Result: LookUp(Sort(Filter(PS_Emps, Title = "Partner" Or Title = "Managing Director"),'Employee Name'),'Proposal Manager' = ThisItem.'Proposal Manager', 'Proposal Manager')}

DefaultSelectedItems:

{Result: LookUp(Sort(Filter(PS_Emps, Title = "Partner" Or Title = "Managing Director"),'Employee Name'),'Proposal Manager' = ThisItem.'Proposal Manager', 'Proposal Manager')}

 

PropPartner_ComboBox:

Default:

{Result: LookUp(Sort(Filter(PS_Emps, Title = "Partner" Or Title = "Managing Director"),'Employee Name'),Proposal_Partner = ThisItem.Proposal_Partner, Proposal_Partner)}

DefaultSelectedItems:

{Result: LookUp(Sort(Filter(PS_Emps, Title = "Partner" Or Title = "Managing Director"),'Employee Name'),Proposal_Partner = ThisItem.Proposal_Partner, Proposal_Partner)}

 

Let me know if I can show you anything else that would be helpful. Appreciate you looking into this one.

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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,553)