# Emmanuel Katto from Dubai : What are the best practices for setting rules when two objects are connected to a single thing?

**URL:** <https://forums.knack.com/t/emmanuel-katto-from-dubai-what-are-the-best-practices-for-setting-rules-when-two-objects-are-connected-to-a-single-thing/18241>\
**Category:** Knacksters' Idea Lab\
**Created:** [November 25, 2024, 11:10am UTC](https://forums.knack.com/t/emmanuel-katto-from-dubai-what-are-the-best-practices-for-setting-rules-when-two-objects-are-connected-to-a-single-thing/18241 "2024-11-25T11:10:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![emmanuelkatto24](https://avatars.discourse-cdn.com/v4/letter/e/ea666f/32.png) [@emmanuelkatto24](https://forums.knack.com/u/emmanuelkatto24)\
**Post date:** [November 25, 2024, 11:10am UTC](https://forums.knack.com/t/emmanuel-katto-from-dubai-what-are-the-best-practices-for-setting-rules-when-two-objects-are-connected-to-a-single-thing/18241/1 "2024-11-25T11:10:13Z")

</div>

Hi Everyone I’m Emmanuel Katto from Dubai, United Arab Emirates (UAE), Here’s a variation of your scenario with a similar structure but different entities:

* * *

I’ve encountered an interesting challenge and wanted to share it.

Here’s an example:

I have an item, let’s say a “toolbox,” linked to two vendors, “FixItFast” and “ToolTime.” This relationship follows a many-to-many setup.

Each toolbox can be associated with multiple vendors.

Here’s a snapshot of the table: **Tools & Vendors**

| Vendor Name | Item Name |
| --- | --- |
| FixItFast | Toolbox |
| ToolTime | Toolbox |

Now, I have a status field that gets updated when the item is used by a specific process. When it’s used, a flag is set that removes the item from the display grid.

Previously, this is how it worked:

| Vendor Name | Item Name |
| --- | --- |
| ToolTime | Toolbox |

This worked fine until I decided it would be useful to associate multiple vendors with a single item. So, I changed the relationship to many-to-many, enabling multiple vendors to be selected for each item.

Here’s the issue:

I currently have a rule set up where if the toolbox is marked as used, the system marks the record as “used.” But now I need a more complex rule.

I want to only mark the record as “used” if all vendors associated with the toolbox have been processed.

For example, the display grid would work like this:

Starting with:

| Vendor Name | Item Name |
| --- | --- |
| FixItFast | Toolbox |
| ToolTime | Toolbox |

If “FixItFast” is processed, the grid would only show:

| Vendor Name | Item Name |
| --- | --- |
| ToolTime | Toolbox |

Once all vendors for the toolbox are processed, then and only then should the entire item be flagged as “used.”

I could probably come up with a workaround for this, so it’s not a huge issue, but I figured I’d ask anyway.

Regards  
**Emmanuel Katto**

---

<div class="post-metadata">

**Author:** ![Erik](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/erik/32/982_2.png) [@Erik](https://forums.knack.com/u/Erik)\
**Post date:** [November 25, 2024, 3:57pm UTC](https://forums.knack.com/t/emmanuel-katto-from-dubai-what-are-the-best-practices-for-setting-rules-when-two-objects-are-connected-to-a-single-thing/18241/2 "2024-11-25T15:57:15Z")

</div>

I think this could be handled by creating an intermediate object like in the example Project [Free Warehouse Manager App Template | Knack](https://www.knack.com/templates/warehouse-manager/).  
[How to Build an Inventory Manager App](https://learn.knack.com/article/2u8hvp1his-build-an-inventory-manager-app)

The parent/child relationship between Products and purchases (or something similar) will get you what you are looking for.

---

<div class="post-metadata">

**Author:** ![Samuel987](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/samuel987/32/4467_2.png) [@Samuel987](https://forums.knack.com/u/Samuel987)\
**Post date:** [November 26, 2024, 4:18pm UTC](https://forums.knack.com/t/emmanuel-katto-from-dubai-what-are-the-best-practices-for-setting-rules-when-two-objects-are-connected-to-a-single-thing/18241/3 "2024-11-26T16:18:35Z")

</div>

This was my first idea here, I believe it’ll work. It would be good to get an update.
