cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jan_mac
Helper III
Helper III

What is the right way to use a lookup column?

I feel dumb asking about this since the task is simple, is update a row in dataverse that has 1 lookup column (category_id)  from another table (Categories). Since it's an update function I supplied the Selected property of my gallery (selectedTraining.category_id) to a dropdown to pull the existing  record however this only shows  a single item, as a lookup column I want to access the other categories from the Categories table  while having having the none updated category as the default. I tried  

Filter(IT_trainings, IT_categories.category_id = selectedTraining.category_id)
LookUp(IT_categories, category_id = selectedTraining.category_id)

but I can't seem to pull the Categories and filter it at the same time, the error's I get are "cannot compare table to record, cannot compare text to record, expecting a table". How do I filter the value of a lookup column and use it's value in a patch funciton? PS: my tables has a 1 to many relationship 1 category multiple trainings.  Thank you 

1 ACCEPTED SOLUTION

Accepted Solutions
jan_mac
Helper III
Helper III

I fixed it now I used the default property of the dropdown, I don't know why but It didn't work before hence why I focused on using Filter at the items property of the dropdown. 

View solution in original post

3 REPLIES 3
rbrooks66
Resolver I
Resolver I

I used Azure SQL DB but are you referring to using the Canvas App Display and Edit modes where the default fields are text (like the screens below)?  I hid the Edit form on the screen and created a new form that saved its values to the hidden form.  That way the drop downs could use a view pointing to the lookup (reference) table but I could still take advantage of the Submit of the Edit form.  Not sure that is exactly what you're talking about.

Detail

Screenshot 2022-06-16 083043 PreLoad Detail.png

 

Edit

Screenshot 2022-06-16 083224 PreLoad Edit.png

 

jan_mac
Helper III
Helper III

I'm not using a form I'm using patch to update an existing record but couldn't pull data from the Categories table.

jan_mac
Helper III
Helper III

I fixed it now I used the default property of the dropdown, I don't know why but It didn't work before hence why I focused on using Filter at the items property of the dropdown. 

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