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

Default Value in Lookup Column

I have a form built on top of a table in dataverse. That form has 3 tabs, for 3 different types of users filling out the form. One of the fields in all 3 tabs is a 'Form Type' which is a lookup to another table, with all of the different form types. Each tab in this form is the form type, but I don't think I can default the value in the lookup based on the tab. If I can, how? But if I'm correct in thinking I can't, I created views of the 'Form Type' Table for each of the tabs and filtered the views to only have the value I want based on the tab selected. I need that field to be locked and read only though, so how do I default the value in the lookup to the first record of its relation? Because of the filter, there is only one record, so it will always be the first record.

3 ACCEPTED SOLUTIONS

Accepted Solutions
PowerPuffKK
Resolver IV
Resolver IV

Hi @mrizz ,

 

I'm not sure I fully understand your scenario, but I gather that you're looking to get the first record from the table you're looking up to and want that to be a default? Are you able to share a screenshot at all?

 

You could achieve your use case using either a First() or Lookup() function but it's difficult without seeing what you're working on.

 

Kristine 

View solution in original post

Drrickryp
Super User
Super User

@mrizz 

I think I would design differently to simplify your app.  Why not have a single form that contains all of the fields.  Then use a context variable to show or hide fields depending on the type of user. The context variable could be set by selecting the tab. This would use a single screen and a single form.

View solution in original post

MayankP
Responsive Resident
Responsive Resident

Hi @mrizz,

 

one possible ways to do it s to have three different forms, for each user types to only access relevant Form..

 

and then you can have Business rule (or JavaScript) against each form to set default value on form type...

 

View solution in original post

3 REPLIES 3
PowerPuffKK
Resolver IV
Resolver IV

Hi @mrizz ,

 

I'm not sure I fully understand your scenario, but I gather that you're looking to get the first record from the table you're looking up to and want that to be a default? Are you able to share a screenshot at all?

 

You could achieve your use case using either a First() or Lookup() function but it's difficult without seeing what you're working on.

 

Kristine 

Drrickryp
Super User
Super User

@mrizz 

I think I would design differently to simplify your app.  Why not have a single form that contains all of the fields.  Then use a context variable to show or hide fields depending on the type of user. The context variable could be set by selecting the tab. This would use a single screen and a single form.

MayankP
Responsive Resident
Responsive Resident

Hi @mrizz,

 

one possible ways to do it s to have three different forms, for each user types to only access relevant Form..

 

and then you can have Business rule (or JavaScript) against each form to set default value on form type...

 

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

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 (1,966)