Selecting Data From Related Tables

Hello,

I am relatively new to Radzen but have used it to develop some simple applications. Currently I am working to create an Inventory Management application.

I am attempting to create a page that displays information from the Inventory table. As you can see, this table is directly linked to the Product table through the ProductKey, and by extension the Customer table via the CustomerKey found in the Product table. However, I am having trouble displaying information from the Customer table in my application.

When generating a CRUD page for the Inventory table I was given the option of including the BinLocation and Product tables but was unable to select tables more than one table removed from the Inventory table.

I then attempted to access this table by editing the displayed columns for this page by adding a column titled 'Customer' which was intended to display the CustomerName. I selected the Product.CustomerKey property and entered ${data.Customer?.CustomerName} in the template but the column was left blank once the page was generated.

Radzen does seem to recognize the connection to the Customer table however as shown by the below listed options available to me in the property drop down box:

Is there another method or resource I should utilize to do this?

I apologize if this issue is discussed elsewhere but I was unable to find an answer myself. I have attached a single jpeg since I am only allowed one media attachment. The images are in order of which they were referenced. Hopefully it is clear enough.

Thanks,

Zach

go to the pageload event. For inventory table goto invoke data method and use $expand parameter to add Product,Customer tables. Now you can use the required fields by ${data.Customer?.CustomerName}

1 Like

Thank you Vinod_Pillai, the $expand parameter was exactly what I needed.

I just want to give a step by step example for future readers of this post that may struggle with this as I did.

Select the data grid and select the 'Events' panel on the right hand side.

Select LoadData.

Select the Invoke step and scroll through the properties that are displayed on the right hand side until you see the $expand parameter.

Enter in the Value section the tables you want to include. Below is my ERD and I will explain how to enter the tables into the value section if the source table is the BinProduct table and you want to include BinLocation, Facility, Product, and Customer.

Enter: BinLocation,BinLocation($expand=Facility),Product,Product($expand=Customer)

Thanks,

Zach

1 Like