-
Hello. I have two tables. Table Parts has a row Part Number, and another column with a relationship named Alternate to a second table named Alternates. Table Alternates has three columns, table one's Part Number (relationship to table Parts), a Supplier Part, and State. Any one row in table Parts can have many rows in table Alternates. In a screen view, when I click on a row in the Parts table, I would like the Alternates table to show the related rows. How can I do this? I want this to be read only data that can be copied by the user or exported. I do not want it editable in this screen so no forms. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Hey @pmankow, This can definitely be done, however will change slightly depending on the data source type you are using. For the demo I'll be going through I will be using the inbuilt internal Budibase data source. Furthermore, I will also be using the sample data provided within Budibase.
![]()
![]() ![]() That should be everything setup properly I hope this helps/points you in the right direction. |
Beta Was this translation helpful? Give feedback.
@ConorWebb96 I have figured this out.
I created two data providers with tables. Both data provider's data is Part data.
In the table under the first data provider (Data Provider 1); actions:
a. Fetch Row; Table: Part Data 1, Row ID: {{ Clicked row._id }}
b. Update State; Value: {{ State.Part_id }}
In the second data provider I filtered the Part data to equal {{ State.Part_id }}.
Under the second data provider (Data Provider 2) I then added a repeater with the conditions:
a. Hide Component if {{ State.Part_id }} is empty. This prevents the screen from becoming a mess of empty tables.
Under the repeater I then added a third data provider: AML data.
a. This data provider's data is …