Using multi-dropdown with lookup table (rather than list)

With my multi-dropdown element, rather than using lists, I’d prefer to use a lookup table with records linking a company, a project, and an ACL.

The following basically works to add a record - create a new relationship record only when multidropdown:value:count>Count [a state set prior to adding a new tag].

But I can’t seem to figure out how to get the “delete a thing” to diff the existing relationship records against the tags in the multi-dropdown (after the “company(lite)” tag is removed) in order to delete the correct relationship record.

Can someone help me figure out how to delete a relationship? Many thx

I don’t fully understand the question…

But to use the ‘Delete’ a thing action, you need to define a Thing from your database to delete…

In your screenshot, you’ve got a Boolean value (although not a valid one) instead of a ‘Thing’ in the ‘To Delete’ field…

What exactly are you trying to do? (what are you trying to delete)? If you’re trying to use a search to define the Thing to delete, you need to use search constraints then: first item.

Sorry, that was a bad screenshot – let me try to explain a little more concretely.

My table of relationships looks something like this:
record 1: Project A, ProjectOwner, Company X
record 2: Project A, ProjectOwner, Company Y

Which both show up as tags in my multidropdown. Adding a new company to the multi-dropdown & the relationship table also works. No problems there.

BUT…

On the frontend, when I click the “x” to remove the tag for Company Y (i.e. record 2) from the multi-dropdown, I am trying to figure out how to delete Record 2.

My thought process is that the multi-dropdown’s list of Companies pre-deletion (here I have captured it in a state list called extantVendors) contains 2 items (Company X, Company Y); The multi-dropdown’s value after making a change (i.e. deleting Company Y) is a list of companies now containing only Company X. So somehow removing the multi-dropdown’s list form the extantVendors list will return Company Y.

“Search for Relationship - projectAssignment”’ should return the one record I want to delete, if only I can figure out how to isolate the company object that was removed (“:minus item” seems like it should diff the two lists, but it doesn’t).

This topic was automatically closed after 70 days. New replies are no longer allowed.