How to set a value?

Certified Associate Developer

Hello Appian Community,

I am trying to set a value = to something else like a simple java statement x=fo but I keep getting false,

why is the default value for =, in appian == in java?

sorry for the noob question but, I have spent hours searching for an answer but have not been able to find anything.

I am attempting to set a value in a interface when one field is changed then another will be reset.

I assume this is possible, however I have not been able to find an example,

thanks, 

Kevin

  Discussion posts and replies are publicly visible

Parents Reply Children
  • What Danny described above is how you initialize a variable. However, in the use case you described, it looks like you want to save a value into a variable. The easiest way to do this is to use the a!save() function to define a target variable and the value you would like to save to the variable. I'd suggest trying something like this:

    saveInto: {
      ri!var1,
      /* I'm assuming you always want to save the value of the first variable */
      /* or else your dropdown wouldn't remember the value chosen by the user :) */
      
      a!save(
        target: ri!var2,
        value: null
      )
      /* You shouldn't need any logic like an if() or isnull() here because you */
      /* would always want to save a null value for var2 when you update var1 */
    }

    If this still doesn't work, I'd also recommend looking at the recipe for a cascading dropdown since that seems pretty similar to what you are trying to do!

  • 0
    Certified Associate Developer
    in reply to Peter Lewis

    thank you so much Peter! GrinJoyKissing heartGrin

    works perfectly