Valid If help (Contains formula excluding current rows)

Hey folks, could use some help here.

Got a table called โ€œManagersโ€, listing managers in my group.

Manager Table has a โ€œCoverageโ€ drop down column.

The drop down selections are
Places,
People,
Travels,
Travels, People
Places, Travels
Places, People
Places, Travels, People

I need a Valid If formula that states "A manager cannot select an โ€œCoverageโ€ entry if another manager has already selected a โ€œCoverageโ€ entry that contains the first.

In other words, Manager 2 cannot select โ€œPlacesโ€ if Manager 1 already selected โ€œPlaces and Peopleโ€

The best I came up with is below

NOT(IN([Coverage], SELECT(Managers[Coverage],
[MANAGERS KEY ID] <> [_THISROW].[MANAGERS KEY ID])))

This only prevents the exact entry from being re-selected
(Manger 2 canโ€™t select โ€œPlaces and Peopleโ€ if Manager 1 already selected โ€œPlaces and Peopleโ€)

I basically need to add a CONTAINS formula for this to work as I need it to.

Anyone willing to be a jolly old chap and help me out?

0 10 551
10 REPLIES 10

am also intrested in this answer i want to exclude a value in a row from visible options for selction i.e
i have a table with options:

  1. Shaded
  2. No shade
  3. Partly shaded
  4. Not recorded
    i want the user not be able to choose โ€˜Not recordedโ€™ option

please someone help

@Makcharlie, why would you want the explicit Not recorded value rather than just leaving the column value blank? How do you envision the Not recorded value being set?

@Mic_L_Angelo

I think the reason is it sounds like your using a ENUM type column. Where even if you choose โ€œPlaces, Travels, Peopleโ€, this isnโ€™t a list. So In() wonโ€™t then work. Try changing it to an ENUMLIST.

@Makcharlie

Set this as the suggested values, or valid_if

IF(

    • some rule - - ,
      LIST(โ€œShadedโ€,โ€œNo shadeโ€,โ€œPartly shadedโ€,โ€œNot recordedโ€),
      LIST(โ€œShadedโ€,โ€œNo shadeโ€,โ€œPartly shadedโ€)
      )

@1minManager iI changed it to EnumList, but the same problem persists. It only limits exact entries, not one that contains the entries.

How should i modify the formula then?

Steve
Platinum 4
Platinum 4

@Mic_L_Angelo:

That your drop-down includes both individual entries and the possible combinations is unusual and somewhat confounds the issue. Better that the column be of type EnumList with only thee possible options: Places, People, and Travels. By merit of being an EnumList, the user will have the option to choose one or multiple options; itโ€™ll also make it easier to validate and query the list. The Valid If for the Coverage column could then be:

(
  LIST("Places", "People", "Travels")
  - SELECT(
    Manager Table[Coverage],
    ([_THISROW].[MANAGERS KEY ID] <> [MANAGERS KEY ID]),
    TRUE
  )
)

@Steve the combination entries was a short-sighted hack on my end. I was unaware ENUM lists allows multiple entries in the same fields. I removed the combination entries, so Iโ€™m not down to 3, People, Places & Travel.

Thatโ€™s the good news.

The bad news is that the formula still doesnโ€™t work, it is, in fact, acting more strangely than the first formula.

Manager 2 can select โ€œPeopleโ€, even though Manager 1 already selected it. But navigating to Manager 1 entry shows the โ€œInvalid Error Messageโ€ with the โ€œPeopleโ€ option hidden from view. I cant de-select โ€œPeopleโ€ unless i select one of the other choices.

I feel like my original formula functioned a bit closer to what I was expecting. All 3 options are visible, but clicking one of the options someone else selected will provide the error. I just need a formula to include entries located with a combination.

Any other ideas?

Hi Mic,

I might have some ideas for you if I can understand what you are trying to do a bit better. Can you book a time with me here: https://app.hubspot.com/meetings/billy42

@Billy_Sheng set up the meeting.

I would recommend reading my original post in this thread as I think it explains the situation well enough

Iโ€™ll connect with you offline!

Top Labels in this Space