Skip to main content
francoh7128
October 31, 2024
Solved

Can I obtain the state of Rule Inputs and Local Variables from an Interface that I'm currently viewing as a user?

  • October 31, 2024
  • 3 replies
  • 0 views

I'm developing a preexisting app with many deeply nested interfaces that render as the contents of several cardLayout components.  The contents displayed are dictated by a set of specific combination of Rule Inputs and Local Variables that is difficult and time consuming to reverse-engineer.  Is there a way that I can get the Rule Inputs and Local Variables of a component that I'm currently looking at as a user so that I can input it into the component in the editor view?  That way I can get the component to render in the editor as I'd see it as a user then work from there.

Best answer by devaprasanthm

Hi [mention:1ca4daa4c65b425d9fcc233233408125:e9ed411860ed4f2ba0265705b8793d05] 

Good Day!

 To get or view the value of the rule inputs/Local Variables we don't have any direct way. I would suggest to display the locals/rule inputs by using text field /rich text display field inside the same section. By this way you can see the values that needs to be used for testing purpose.

3 replies

devaprasanthm
New Participant
November 1, 2024

Hi [mention:1ca4daa4c65b425d9fcc233233408125:e9ed411860ed4f2ba0265705b8793d05] 

Good Day!

 To get or view the value of the rule inputs/Local Variables we don't have any direct way. I would suggest to display the locals/rule inputs by using text field /rich text display field inside the same section. By this way you can see the values that needs to be used for testing purpose.

francoh7128
November 1, 2024

Great tip, thank you! The "console.log()" of Appian as it were.

somasundaram.d
November 1, 2024

You have to start with the innermost rule or interface, and backtrack from there by passing each input that will give you the desired output. In this way you will be able to understand the code better and reduce chance of undesired behaviours.

You can also have a paragraph field and pass the rule input or local variable to it value to see the data that is being passed.

While doing this, make sure to update the descriptions of the rule inputs, so that it can readable and maintainable.