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
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (2,033)