I have two tables in Plasmic CMS : ‘locataires’ and ‘location’
in table ‘locataires’, I have a reference field to table ‘location’
Now I have the data fetching component for displaying the ‘locataires’ list.
In each row, I’d like to have the details onf the corresponding ‘location’.
I hoped I could access the reference field, and filter with, but it’s not available.
Is there any way of doing this ?
Hello @mf_de-preval.
From taking a look at your project, it looks like one of your Locataires
has no Locations
reference, and that’s why you don’t see it in the Data Picker. Other than that, you’re doing the correct thing to make it work.
Hi,
I did not suspect this, but it works actually …
Thanks for the hint.
Now, what this does in the end is, for any ‘locataire’ with a blank ‘location’ reference, it gives the whole ‘location’ list …


Is there any way to query the CMS to have the list empty if the reference is empty ?
(like SELECT * FROM ‘location’ WHERE id=$ctx.plasmicCmsLocatairesItem.data.location)
You can add dynamic visibility in that element. You can choose the element to be visible only if $ctx.plasmicCmsLocatairesItem.data.location
exists.
1 Like