cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
spsolutionsgrp
Helper V
Helper V

Lookup field / Picklist or Entity

FIrst let me mention I am not a CDS or Relational Database expert and most of my knoledge comes from Access bacj in the day.   I am trying to wrap my head around Picklist in CDS.  If I was building a relational database I would have on table with an ID column and a value column (example: locations) and I would have another table with sales data where one on the columns is the location ID.  You could then create a query to get the location name and sales data together.   The would prevent repeating the same location information over and over again in one table.   Why do we not do this in CDS or should we.  Is there a speed difference in PowerApps for creating entities insted of Picklists?

 

I am having an issue with dropdown and display fields in PowerApps caused by Lookup fields and I am not sure if entities are a better option.   I am thinking they are not but looking for a technical reason to wrap my head around.   

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
EricRegnier
Super User II
Super User II

Hi @spsolutionsgrp, There are many pros/cons to both picklist/choices/optionsets and entity/table lookups. Here are the top that come to mind:

Picklist/choices/option sets Pros

  1. Easily deploy to target environment with solution since items are considered as metadata whereas entities records are data (but can easily import as well with Config Migration Tool)
  2. Simpler UX in model-driven apps as choices are rendered as simple classic dropdowns (mostly irrelevant in canvas apps), where lookups are more features like searching and filtering
  3. Out-of-the-box multi-language support

 

Entity/Table as lookups Pros

  1. This is the biggest decision factor in my opinion and my preference. Future thinking, entities give more flexibility, especially if eventually you need more properties/fields to the drop down items (e.g. Display Order). So many times I had to convert and deprecated choices/optionset fields/columns to lookup instead.
  2. Out-of-the-box cascading dropdown/lookups, where choices/optionsets requires JavaScript in model-driven apps.

Hope this helps!

View solution in original post

3 REPLIES 3
summitb
Power Participant
Power Participant

You can configure on what to show in the Look View of that entity. I think Picklists will probably be always faster.

To make a decision on what to choose, I think the simple way to think about it is... if you want the options in the dropdown to hold more information that its name and value, then go for entities. Entities gives you ease to add more information to the option selected.

Fubar
Solution Specialist
Solution Specialist

There are pros and cons to both, for me the key factor is usually:

  • Picklist - good for static lists where items are unlikely to need to be removed (as removing an existing item will put an empty in existing records using the removed item).
  • Lookups - good for when there is a need to 'retire' values (e.g. you can only allow users to select active records and deactivate retired ones - as the value is not deleted existing records retain their value), or Users (that are not customizers) need to be able to add there own values.
EricRegnier
Super User II
Super User II

Hi @spsolutionsgrp, There are many pros/cons to both picklist/choices/optionsets and entity/table lookups. Here are the top that come to mind:

Picklist/choices/option sets Pros

  1. Easily deploy to target environment with solution since items are considered as metadata whereas entities records are data (but can easily import as well with Config Migration Tool)
  2. Simpler UX in model-driven apps as choices are rendered as simple classic dropdowns (mostly irrelevant in canvas apps), where lookups are more features like searching and filtering
  3. Out-of-the-box multi-language support

 

Entity/Table as lookups Pros

  1. This is the biggest decision factor in my opinion and my preference. Future thinking, entities give more flexibility, especially if eventually you need more properties/fields to the drop down items (e.g. Display Order). So many times I had to convert and deprecated choices/optionset fields/columns to lookup instead.
  2. Out-of-the-box cascading dropdown/lookups, where choices/optionsets requires JavaScript in model-driven apps.

Hope this helps!

View solution in original post

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (30,178)