cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sajarac
Super User
Super User

ComboBox and SharePoint ID's

Good morning Community. Happy Friday!

 

I have this question and I hope someone could point me in the right direction:

 

I have 3 Sharepoint lists:

Departments

Employess

Cards.

 

I have my "Form" connected with my SPL "Cards" in that list I am saving the ID's of the selected items in my comboboxes. When I am in edit/new mode I would like to see the combobox value not the ID, but still able to save the ID once the item is selected.

 

For instance in the below chart I have selected for department "Quality" and for employee "Louis M" and I am saving those ID's in my SPL "Cards".

 

But the default value of those combobox I would like to see the value instead of the ID, Something like a Vloopup against the collection?

 

I don't know, I have been trying to figure out with no success.

 

Thanks in advance for any help.

 

Regards.

 

sajarac_0-1620993356306.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@sajarac 

 

For the Departments Combobox:

   Items property should be:    Departments

   DefaultSelectedItems property should be : LookUp(Departments, ID=Parent.Default)

 

For the Employee combobox:

   Items property should be : Employees

   The DefaultSelectedItems property should be: LookUp(Employees, ID=Parent.Default)

 

The Collections and ShowColumns are just extra overhead for your app and you don't need them.

 

I hope this is helpful for you.

 

EDIT: I realized you mentioned you were just storing the ID (I had assumed a Lookup column).  I've adjusted the above to reflect what you have.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

5 REPLIES 5
RandyHayes
Super User
Super User

@sajarac 

 

For the Departments Combobox:

   Items property should be:    Departments

   DefaultSelectedItems property should be : LookUp(Departments, ID=Parent.Default)

 

For the Employee combobox:

   Items property should be : Employees

   The DefaultSelectedItems property should be: LookUp(Employees, ID=Parent.Default)

 

The Collections and ShowColumns are just extra overhead for your app and you don't need them.

 

I hope this is helpful for you.

 

EDIT: I realized you mentioned you were just storing the ID (I had assumed a Lookup column).  I've adjusted the above to reflect what you have.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
sajarac
Super User
Super User

Oh boy. Thank you very much. I will adjust accordingly. I thought that making collections was a good practice instead of working against the data. but I will follow your advice

RandyHayes
Super User
Super User

@sajarac 

There is no value to the collections in this case, unless you are working offline or have a need to add or remove rows to the collection in your app.  

As for the ShowColumns, it is a misunderstanding that using the ShowColumns reduces the amount of data transferred (and thus it is a good performance tip)...it is not.  The DataSource always returns all the columns, the ShowColumns just takes that table and removes all the other not mentioned columns.  So, really, in this context, it's just more or a hit on performance for the extra step.  

Now...keep in mind, both Collections and ShowColumns have their place and value.  Just not in your case.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
sajarac
Super User
Super User

Oh Boy, I would like to do something like the Matrix needle scene. I need to transfer your knowledge.

 

Thank you very much. 

 

Problem solved.

 

sajarac_2-1620999500000.png

 

 

 

 

RandyHayes
Super User
Super User

@sajarac 

I'm working on that App 😂😂  For now we can only choose the red pill or the blue pill. 😁

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

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 (2,878)