if-condition in a data entry reverse algorithm

Hi ALL,

I would like to write in data entry a value in a column algorithm in the block c and based on the value of the block d I would like block a or block b to become equal to block c.

To do this, I enabled data entry on blocks a, b and c. The algorithm in c is "if(d=0,a,b)", and tried entering as reverse algorithm 'if(d=0,a=c,b=c)", but it tells me that the inverse algorithm is invalid.

Is it possible to insert an if-condition in the reverse algorithm?
If the answer is yes, how should I write the coding?

Thanks for any assistance.

Deborah

Tagged:

Answers

  • Hello @deborah.federico,

    With the reverse algorithm, you have to declare which is the data block you want to recalculate upon the input of a value in the calculated block (algorithm). The data block to be recalculated must be one of the factors in the algorithm formula.

    You can find a simple example here: https://www.boardmanual.com/2023/summer/capsules/screens/objects/the-layout-object/data-blocks/block-settings/about-data-block-settings.htm

    But, back to your case, based on the condition you're inputting in block c, c will be equal to a or b depending on d. if I understood the case correctly, It seems you're setting the same condition twice. I don't think you need the reverse algorithm.

    Hope this helps.

  • Hello,

    I agree with Federica's comments. Looking at your setup, it appears, you don't even need to enable Data Entry on the 'c' block as you're leveraging the algorithm to push numbers from already existing content in 'a' and 'b' block and not through manual inputs, which negates the need for a reverse algo altogether.

    Maybe, if you could elaborate on what you're actually attempting to achieve, we'll be able to make recommendations for a potential workaround. Either way, you may please feel free to submit a new idea if you find a feature which is missing and you want to see in future releases of our product for your business use cases.

    Thanks & Regards,

    Rishabh Shahi

  • deborah.federico
    deborah.federico Active Partner
    Board Developer First Comment First Anniversary Level 200: Building A Planning Solution in Board

    Hi Federica and Rishabh,
    thank you very much for your reply.

    I simplified the case to explain that I needed the inverse algorithm to recalculate one block or another according to the condition, so the result of the algorithm was not a single factor.
    But I realised I was complicating it and that there was a simple way to do it.
    Thank you very much for your support,
    Deborah