Boolean dependent selection with DCA

I am trying to find a solution to my module : I have 3 booleans

  • Boolean A
  • Boolean B
  • Boolean C

The Booleans B and C can be selected only if Boolean A is selected. I have used the DCA for this. The DCA is a simple one : A. The DCA is applied to B and C.

My question is : when I deselect the Boolean A, the Boolean B or C that were previously selected, stay selected. How can I deselect them? Basicly, what I want is: when deselecting the Boolean A, I want the Boolean B or C that were previously selected, to deselect automaticly when deselect the Boolean A. Thank you

Best Answer

  • TristanS
    Answer ✓

    @ilincach just to confirm my understanding is correct. I'm assuming A, B and C are all editable line items (has no formula applied against them). When you set A to FALSE, you want B and C to automatically set to FALSE as well. As it may be possible you may have set B or C to true when you initially set A to TRUE.

    Short answer is that you cannot "automatically" set B and C to FALSE

    But there are are workarounds you can do that can have similar desired effect by applying the following steps:

    1. Apply a read only DCA on B and C based A being selected (If not done yet). I know you've applied DCA on write permissions but not sure about the read DCA permissions. When you apply DCA on the read this will show B and C as empty "giving a visual impression" that B and C has no value or set to FALSE
    2. Create another intermediate line item for both B and C line items. E.g. "Intermediate B" and "Intermediate C". They will have the following formula
      * Intermediate B = If NOT A then FALSE else B
      * Intermediate C = If NOT A then FALSE else C
    3. Update any formula that references that uses B and C to use the Intermediate line items instead.

    Another alternative is to have an action button that users or can be scheduled to run to set B and C to FALSE when A is FALSE

Answers

  • Hi, Thanks for your answer.

    My question was edited so it's not correctly reflecting my issue. To rephrase: i have Boolean A - when it's checked , you can't override it. Boolean B, when it's checked, you can override it with Boolean C. My check on Boolean C workes fine : it gets checked as I want. The issue is that, when going in the UX, even if Boolean C is checked, I can't do the override.

  • @ilincach Reading between the lines with your comment above. If it's only setting to read-only in the UX but can be edited in the model, can you check the card configuration to see if "Enter and edit cell data" is selected as per screenshot below.