cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
deepakraj610
Regular Visitor

How to use Same Form Control as New, Edit and View Mode

Hello Team,

 

I'm having a Gallery Control(say GalCustomerDetails) to fetch data from SharePoint List (say CustomerDetails , CustomerMaster) .

 

Form Control Name - frmCustomerDetails

Combo Box 1(input Field) - CustomerID (ID's listed from CustomerMaster)

Question:

Combo Box 2(output field and always disabled) - This needs to pull Name from Customer Master in New Mode

 

On a button click I will have to save the form to CustomerDetails. I only have 1 form which should act in New, Edit and View Modes

 

I need to use 2 data source for Combo Box 2. ie, New Mode will have to fetch from CustomerMaster and Edit/View mode will have to fetch from CustomerDetails

 

Please help me on this!!

 

Thank you in advance!!

1 REPLY 1
Drrickryp
Super User
Super User

@deepakraj610 

You can use the Coalesce() function to apply to the Items property of the combobox.

Coalesce(Parent.Default, somefunctionforfillingthecombobox)

Coalesce() evaluates its elements from the left to the right until one is found to contain data.  In the case of a new Form, Parent.Default will always be empty so it will evaluate your function for the item property.  When data is saved, Parent.Default will contain data and the Coalesce() function will stop there. 

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

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.

<
Users online (5,613)