Sorry, we don't support your browser.  Install a modern browser

Use Functions / Assign the result of a conditional to a variable#156

In a document you may have a complex if-then test to determine the output (e.g. how you refer to a party in a contract) and then you may refer to that name over and over. Currently you have to put that conditional statement every time you want to refer to the party. It would be better to have that conditional statement resolved once and then assigned to a variable and then within the document simply use that simple variable over and over. This would make the document cleaner to read, faster to process (running the if-then only once), and easier to modify (e.g. if you need to change the logic).

Basically it is a system for putting a function in a workflow and assigning the output of the function to a variable.

3 years ago

Hi @Cyclone Covey,
This is exactly what Invisible Logic is designed for! You can see an example of setting up an if-then test to determine if a client is the petitioner or respondent

.

Does this sound like what you’re looking for?

3 years ago

It’s close, but the current system is not enough from what I can tell. For example consider an IF statement to check the number of responses to a repeating item.

{% if Clients.number() == 1 %}Client{% else %}Clients{% endif %}

The current invisible logic system is unable to make this check and assign the result to a variable. The current system only checks if a single variable IS/IS NOT some other value. This example is pretty simple and we use more complex statements that we would like to insert into a variable or constant. I think if would be hard to make a GUI like you have flexible enough to accomodate all the possible permutations, but either way what is there now would not work, at least not for our requirements.

3 years ago