How to create a boolean with Radio Button like properties?

Hi Everyone,

 

I want to create a boolean line item in a module dimensioned by a list, which can only be true for one list item only at a time.

Let's say, the list has 10 members and initially that boolean is false for every list item. User checks the boolean for list item 2 and then User checks the boolean for list item 5 so after this check, the box of list item 2 should uncheck or become false itself. Only one or none member can be checked at a given time for this line item. Is it possible to create such line item in Anaplan?

Tagged:

Best Answers

  • @ShubhamCh 

    In your system module you can create several Boolean checks. The first will SUM the number of check boxes. So you'll need to add another line item in addition to the check box that converts the check to a one (1). If the sum of that line item is >1 then filter is TRUE. Another Boolean line item will be needed so that if the sum is <=1 then all list items are TRUE. If the sum >1 then only the list items that are checked are TRUE. Then use this filter on your grid.

    You got this! Pretty cool, huh?

  • @ShubhamCh 

    Can I offer a possible solution.

    Use Dynamic Cell Access to limit access to the boolean line item depending on whether the line item or top level item of the relevant list is checked.

     

    While no items are selected the user can update all items. 

    ChrisAHeathcote_0-1664183006869.png

    Once an item is selected access to the other items is blocked.

    ChrisAHeathcote_1-1664183056104.png

    Use an IF THEN ELSE statement along with SELECT to build the formula. Set the summary settings on the DCA? line to ANY.

    ChrisAHeathcote_2-1664183135880.png

    If you would like to allow users to select more than 1 item then set up an additional line item and count how many items are selected. Then use this number line item to build the query in the IF THEN ELSE stating the value at which access is denied. 

    Users will need to deselect items before opening up the options but this is a good way to limit user access to a specific list selection. 

     

     

Answers

  • Hi @ShubhamCh

     

    Very nice thought, I think it is not possible, since your line item is an input, change in value/selection can be done by formula or by import. same line item cannot work like radio button.

     

    Thanks,
    Manjunath

  • @ShubhamCh 

    Yep. Just like @ManjunathKN I wish this was possible but that would require the ability to edit both sides of the equation. Anaplan's calculation engine which uses a DAG does not allow us to direct the calculation direction. Anaplan calculates that for us.

    In regards to your use case, one way I have helped users address this is to do the following:

    • Add a filter on your grid that looks for multiple checks. If it exceeds 1 check then filter on the checked boxes. This will tell your user immediately if there's a duplicate check box. Once they fix it, the filter puts the grid back the way it was.
    • Add conditional formatting so it's clear which boxes are checked.
  • @JaredDolich 

     

    What a great idea!! 

    How do I build this filter which gets activated only when there are more than one selection?

  • While you can't have a "radio" input field, consider an alternative architecture that meets the data entry requirements. In your case, the requirement is that a user can select only a single item at a time. You can meet this need by providing a drop-down to select the item. You can formulaically generate the Boolean view of the selection as well. See below for example.

     

    UX:

    ryan_kohn_0-1663695010716.png

     

     

    Blueprints:

    ryan_kohn_1-1663695050537.png

     

    ryan_kohn_2-1663695068338.png

     

  • Thanks @ryan_kohn for the idea but it won't be practical when there are more than thousands of Activities to select from the drop down, right?

  • @ShubhamCh 

    Thanks for the idea @JaredDolich !

     

    I have shared below on how to achieve that.

    ManjunathKN_0-1663697464845.pngManjunathKN_1-1663697498985.pngManjunathKN_2-1663697537015.png

    Thanks,
    Manjunath

  • Thanks @JaredDolich for the awesome idea!

    Thanks @ManjunathKN for the detailed implementation steps!

    Kudos to both you👍😊!

  • What do you think is impractical about it? Keep in mind that selecting a single item is explicitly what you want the users to be doing. The other suggestion provided by @JaredDolich can work as well, but it is more of a "accept any input and validate after" approach vs restricting the user to doing only what they are allowed.

     

    I believe the core usability consideration here is how to help the user determine which single item they want to select. Providing only a drop-down selection doesn't really assist with that unless they already know the specific item they want to use. What I would suggest is still providing a grid of the possible selections so that the user can filter/sort/etc to narrow down the item they want to choose, and they can copy-paste into the selection field.

     

    I'd suggest reading through this article that compares radio options vs drop-downs as UI input choices. The recommendation is to use radio options if there are fewer than 7 choices, or drop-downs if there are a larger number of choices. With that in mind, my suggestion would be to use Jared's approach if there are a small number of options, or a drop-down if you have a large number of options (which it sounds like you do).

  • Hi @ryan_kohn ,

     

    It is impractical for my user story because:- 

    - It requires one more grid on the page. There are a lot of grids on the page already. User won't like one more grid on the page.

    - Even if I add this line item on an existing grid. The User will have to copy and paste the name of the member for which they want to turn on the boolean. If you were the User, which one you would prefer - Ctrl+C , Ctrl+V, and then Delete the pasted name or a simple click on a boolean or just the click on the name (For which Anaplan is syncing to the parent level in the bottom grid Link for the discussion).

     

    Your solution is correct but I can't use it in my scenario because I have other limitations and User won't prefer copy-paste to find the clicked list item in the bottom grid.

     

    Thanks!

    -Shubham 

  • @Vinay VaradarajM 

     

    Nice one!

    Thanks for sharing!

     

     

  • @Vinay VaradarajM 

     

    This is also a good approach. Thanks for sharing.

  •  

    Thanks for the solution @ChrisAHeathcote . I see, you have refined @Vinay VaradarajM 's formula even more. Kudos to you too.👍

     

    - Shubham

  • If you found it useful can you mark it as a solution.
  • @ShubhamCh 

    Don't want to interrupt. But why do you need THEN ELSE here? The final formula can be written without IF THEN ELSE as the result is either TRUE or FALSE and it matches the conditions in IF statement.

    I would shorten it to: Select? OR NOT Select?[SELECT: Dummy list.All items]

    @ChrisAHeathcote @Vinay VaradarajM  what do you think?

  • Yes, you are right!

    As there is only two outcomes to consider, TRUE or FALSE the IF THEN ELSE is not necessary.
  • @ChrisAHeathcote @Vinay VaradarajM @ShubhamCh @ManjunathKN @ryan_kohn @JaredDolich  I am so happy that collectively we are able to help people find the best and the most efficient solution. Good job everyone!

    This is what this community was built for!

  • @KirillKuznetsov 

    I've always felt there's no "best" or "one" answer. Just knowing Anaplan has the tools to flex into almost any situation is the most satisfying part. Seeing what everyone comes up with is just as rewarding.

    Great teamwork!