Validation in load and with and returning a boolean value

Hi

I have an interface with load and with, when a user updates a value in the interface I need to return a boolean value and I am using that in another rule.

In the load I have a local variable in which I am saving the old value and in the with I an doing a isnull(symetricdifference9oldval,newVal) and assigning this to a local variable and passing this to the other rule. 

I am having an issue in setting the boolean value please advice me here. 

Thank you. 

  Discussion posts and replies are publicly visible

Parents
  • Hi,

    From your question, I could understand that you're assigning the result to a variable in load() again, This will not work as load variables will be executed only once. If that's not the case, please share your code here(by using insert->code) for better understanding.

    Alternatively, if your Appian version supports a!localVariables(), then it'll be a lot easier to implement.

  • Hi Selvakumar,

    I am assigning the local variable with the result in the with and using the result in the with to pass to a child interface. 

    I have a form layout in the with and I am declaring everything before the form layout. I hope the below code snippet helps to guide me. thank you.

    load(
    local!oldVal: employeeData_cdt.empName,
    
    )
    with(
    local!isReadOnly:
    if(
    and(
    isnull(symetricdifference(oldval,newVal)
    )
    )
    )
    a!formlayout(
    
    rule!EMP_Details(
    /*this is the child interface where we can edit the empl details and if the details are 
    modified I need to update the local!ReadOnly to true or false.
    )
    
    rule!EMP_Validatedetials(
    local!isReadOnly,
    )
    )
    )

Reply
  • Hi Selvakumar,

    I am assigning the local variable with the result in the with and using the result in the with to pass to a child interface. 

    I have a form layout in the with and I am declaring everything before the form layout. I hope the below code snippet helps to guide me. thank you.

    load(
    local!oldVal: employeeData_cdt.empName,
    
    )
    with(
    local!isReadOnly:
    if(
    and(
    isnull(symetricdifference(oldval,newVal)
    )
    )
    )
    a!formlayout(
    
    rule!EMP_Details(
    /*this is the child interface where we can edit the empl details and if the details are 
    modified I need to update the local!ReadOnly to true or false.
    )
    
    rule!EMP_Validatedetials(
    local!isReadOnly,
    )
    )
    )

Children