Condition on a Boolean.

Options

Hello,

Is there any way to have boolean line item with a formula and editable depending on the condition?
For example:

IF Condition_1
THEN True
ELSE
(boolean editable by the user)

Thank you

Answers

  • anirudh
    edited July 2023
    Options

    Couple of options here:

    If your model has Versions and your module has time and versions applied to it, then you can set the formula as True and change the Formula Scope to Actual Version (check the blueprint view for the formula scope)

    The formula will stop working form the switchover period as set in the Versions settings and then allow input

    The other way is to import into a line item which has no formula and then use dynamic cell access to block input for the cells where you want it to appear as a formula. The obvious issue here is the data is not automatically refreshed and will need an import action that must be triggered somehow

    Let me know if you need further help

  • Hi @EYOU

    It can't be done in the single line item unless you're using versions as a dimension in the module, but the same functionality can be achieved using two line items, DCA and conditional formatting.

    If Condition_1 true than True else User Input line item. You can apply DCA and conditional formatting to make it obvious when the user can input.

    Thanks!

    -Shubham

  • TristanS
    edited July 2023
    Options

    @EYOU As others have advised there are multiple options. So here's another option and I'm not sure how it would affect useability (readability) of the line item you are trying to set. Instead of setting the line item to true is it possible to name the line item that it sets to False instead?

    For example, if the line item name is "Enabled?" and so you want it to True when condition below is met

    IF Condition_1
    THEN True
    ELSE 
    (boolean editable by the user)

    But if you name the line item "Disabled?" (inverse intention of your current line item) and then your condition changes to the one below

    IF Condition_1
    THEN False
    ELSE 
    (boolean editable by the user)

    A boolean line item by default sets to false so there's no need to setup a formula against the line item. Only thing you need to do is setup a DCA against that line item by applying condition_1 (refer to screenshot below) as per @ShubhamCh suggestion