a!localVariables( local!Details: rule!GetInformation(), a!formLayout( ....... showwhen:if(local!Details <> "ERROR") ) )
Hi,
I want to show the formLayout in the design mode(designer/expression) irrespective of the return value of rule!GetInformation() expression rule. However in runtime the form should load as mentioned in above code i.e., based on the return value of rule!GetInformation() .
Kindly suggest.
Discussion posts and replies are publicly visible
Hello Sameer Ul Haq
Use default value function and while testing you can set the default to true.
Appian does not support to run code depending on whether it runs in designer or "runtime".
What do you want to achieve?
Sameer Ul Haq
You can differentiate the design time and the run time using groups in Appian. If anyone, in the developers/administrators group tries to access this, it will load normally, but if anyone from the business groups (all users, etc.) tries to load it, then the condition is validated.
Since i want to load the interface for designing and see the changes reflecting i dont want the rule to be called how to achieve that. when i am designing.
I am not sure I understand which problem you want to solve. What is wrong with that rule? When I design an interface, I typically provide some test data to see how it works.
You can also create a dedicated "debug" group for this type of requirement have a DEBUG environment constant that you enable on a per environment basis.
Alternatively you could always use the application's admin group which usually includes Designers.
That rule is a integration call which will throw an error when data is not passed. We dont want to pass the data when we are designing an interface and hence interface should load with no data. In designer/Expression mode we want the integration call(expression rule) not to happen such that interface is loaded.
I would create a rule input isIntegrationEnabled which I would set to false in design mode.
In your interface, I would create a local variable with the same name and use a!defaultValue to set it to true in the case it is not defined.
You can then use the local!isIntegrationEnabled to only call the integration if enabled.
But ... designing an interface without showing ANY data ... not sure how I would do that ... maybe lots of guessing and rolling a dice!?!?!
Then, you could just use some example data instead of calling the integration in case no data is passed.
To be honest, I do not see the problem ....