Add Columns to Dropdown Field From Another Table

Hello,

I have an automatically generated 'Add' page and would like to add a column to the drop down for one of the fields from another related table.

For reference, here is my ERD.

The add page will add a record to the Setup table. When selecting a Part Number to add to the setup in the drop down box, I would like to also display the customer that Part Number belongs to. Currently, I have only figured out how to display the CustomerKey found in the Part table and am unable to link to the Customer table to display the CustomerName.

I am familiar with the $expand parameter and successfully used it on the original data grid, but am unsure where and how to use the parameter for the 'Add' and 'Edit' pages.

This is as far as I have gotten, but again, this is only displaying the CustomerKey found in the Part table, not the CustomerName from the Customer table:

Any help is appreciated, thank you.

Zach

It can be added to the data source method that populates DropDownDataGrid for Add/Edit pages in Load event.

1 Like

Thank you enchev, works great!

Hello,
I have the same problem. Even after adding $expand field with correct table name, I am not able to see the fields of the expansion table. Related Information: Add Basic Filter page (For basic filter table), which has Attribute_ID as FK to Attribute table. Attribute table has Topic_ID as FK to Topic table.

grafik

grafik

When clicked on the Columns of the "Attribute", the following page comes up when I click on the Property dropdown, the list appears only with the fields of Attribute table, there is no Topic field in the list.

In general, when I click on Columns of the form, I see this Select Schema all the time, even though I choose the correct one (Basic Filters) and save it, it keeps unchoosing after I press OK.

It would be awesome it you could help,
Thanks

There are several things you can try, but I do not have enough information to determine what exactly you need to do.

  1. Ensure you have included the expand parameter on all required load events, such as the Page or Form load event.

  2. If the expanded table is more than one table removed from the source table, you need to modify the statement slightly. Please reference my ERD at the beginning of the post. When expanding to the Customer table from the Setup table, my expand parameter will read: Part,Part($expand=Customer). You must first expand to the Part table before expanding to the Customer, but I do not know your model so I cannot say for sure.

  3. You may also try just typing the property you wish to select manually, even if it is not included in the dropdown list. So if you want the topic, simply type 'Topic' in the property and select add. If topic is in an expanded table you will have to type Topic.TopicName or whatever you have named your table and attribute.

Hopefully this helps, if not you could try including some more information.

Thanks,

Zach

1 Like

Hi Zach,

I tried all the steps you wrote and actually #3 has worked :slight_smile: I was really not expecting this.

Thank you for taking time and writing this long post.

Of course, it would have been awesome, if Radzen would support this directly without needing to write.
Best,