Want to add relation column in source

I made relation coloumn in sheet and want to make dynamic choice filter but relation column show in value

You can’t use a relation as the source for a choice component.

A choice component uses values from a single column, which can be in any sheet/table anywhere in your app. So if you have a list of options in a single column somewhere, you should be able to reference that column directly, without the need for any relations.

These is your commubnity app example

Apologies, my mistake.

You can use a relation as a source, but only if is a multi-relation.

So check that.

2 Likes

I have select multiple check but still doesnot shows

If I’m correct your Tab Source Sheet/Table has to be the Communities Sheet/Table. Then you can select that relation column as the sheet in your choice component.

Yes you are correct that my table is for communities but I build a relation between communities and items

I think I’m missing some key information here. Your first screenshot shows you are attempting to select a relation in the ‘Values’ setting. That’s not correct. The relation would be selected in the ‘Sheet’ setting because the relation would be the source of the data. Then you would be able to select a specific column from within the relation.

Keep in mind that relations are links to related ROWS. They return rows of data, like a mini version of a complete table. They do not return a specific column. That’s why you can’t select a relation for the ‘Values’ setting, because we still don’t know which specific column you are referring to inside of that relation.

Your second screenshot correctly shows a relation being selected for the ‘Sheet’ setting instead of the ‘Values’ setting.

As @Dilon_Perera pointed out, you have to make sure that the detail screen or your app tab is connected to your Communities table. I am unable to tell, in your screenshots, if your Public tab is connected to the Communities table, or if it is connected to a different table.

2 Likes

Let me explain I want to use items relation which is in community table in choice component you may clear with my snapshots.


Yes, that’s fine, but you are trying to set the Value setting to the relation. You should be setting the Sheet setting to the relation as that will be the source data for the choice component.

You may be running into issues because you are using an Add Form. The add (+) button is only available on a tab with a List style layout. Which means that the screen isn’t attached to any particular row, so there may not be a relation that’s available to use as your choice source. It’s hard to tell for sure. It would help to know for sure what the screen looks like before you open the Add Form.

If your Add Form is adding a row to the Communities sheet, keep in mind that a relation won’t build while you are filling out the form because nothing has been written to the sheet until you click on submit.

2 Likes

But Add form add row in observations table so why would not able to get relation in source?

So you are adding a row to the Observation table? How do you get to that Add Form Screen? To use that relation, you need to be coming from a details screen that’s showing a specific Communities row. I’m still not following how your app is set up.

Regardless, you are trying to set the Choice component incorrectly like I mentioned above. A relation has to be set in the Sheet setting of the choice component settings.

I need more information to understand how you are getting to that screen. I’m confused how you are getting there.

I don’t want to explain what may be the problem until I fully understand your app flow and know for sure that you are attempting to set the relation in the Sheet setting of the choice component settings.

1 Like

I have one community table one items table and one community have one or more items. one table is for observations add form is use for add an observation for particular item . My form flow is one choice component is for community and other is for items. All I need is if I select community A than Item’s choice only have items which are associate with community A. That means item’s choice component is depend on the community selection

If you select a Community in the first choice component, it does not set a pointer to that community row. It only sets the selected community value for the observation that is being added. Your Item choice component does not know which community has been selected, so it would not know to use a relation from any particular row.

What I think you should be doing, is to set the sheet source for your Items choice component to the Items sheet. Then filter it by using the Communities Screen Value.

1 Like

Okay Thanks. I get what I want. Thank you

1 Like