How to copy a boolean to a different table

I have a table for promotional offers.

However I only want these promo deals to be visible on the app if the business is active.

I have a boolean for indicating whether or not the business is active BUT it’s located on a different table.

How do I bring that boolean over to this table?

In your Deals table, for each promotional offer (on each row), is it clear which company the promotional offer is for?

If not, you would need a column with the company name or company ID (which would be the Row ID from the companies table). This would allow you to link a deal to its corresponding company.

(The reason it’s preferable to use a company ID rather than a company name is because row ID are unique and won’t change, whereas a company name can be subject to name changes, spelling errors, etc.)

Once the link is clear, you can create a single relation in the deals table pointing to the company table. Then use a lookup column point to the relation to pull in another information you need about the company. In your case whether the business is active or not.

2 Likes

hi! thanks nathan! I thought that was the right thing to do, but my lookup column isn’t working. perhaps i set it up wrong.

I have my business (salon) relation set up with the row ID, and then I have a look up column through “salon relation” pointing at the boolean and none of them are checked off?

Could you show a screenshot of how you setup the relation between the Deals table and Businesses table?

1 Like

You seem to have that logic stored in an If-Then-Else column.

Corrected it.

1 Like

Thanks guys! @nathanaelb @ThinhDinh

2 Likes