How do I retain values in Local Variable after a!startProcess

Certified Associate Developer

I have a button on an interface that is used to start Process using a!startProcess in the background. Now I want the values of the field to be retained. Once the process the completed, all the local variables are refreshed to empty or null values. How do I retain these values.

For other fields I am using ri! but for a particular values that I am having operations on in the interace I am bound to use local variable here. Am I missing something here? I tried using rule inputs, but the usecase requires me use a local variable here. Also tried saving this to an ri! and onSuccess saving back to local! but that didn't help. Any help or direction that I should be looking towards to solve this?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    I would assume that you can save to the local variable via the onSuccess.

  • 0
    Certified Associate Developer
    in reply to Mathieu Drouin

    I'm passing this value via a local!Variable to a separate interface , wouldn't it be redundant to save localVariable back to the same Variable?

    Tried this approach as well just to try my luck,  but alas!

    onSuccess:{
                    a!save(local!draftBtnClicked, true),
                    a!save(ri!attestationDetails, fv!processInfo.pv.attestationDetails),
                    a!save(ri!questions, fv!processInfo.pv.questions),
                    a!save(ri!reminderEmailDetails, fv!processInfo.pv.reminderDetails),
                    
                    a!save(local!initialReminder, local!initialReminder)
                    }

    Here's how my sectionLayout that hold the particular screen is: Is this a wrong approach?

    a!sectionLayout(
                      contents: {
                        rule!EA_captureReminderDetails(
                          attestationDetails: ri!attestationDetails,
                          initialReminder: local!initialReminder,
                          adhocReminderEmail: local!adhocReminder,
                          isModifybuttonSelected: local!isModify,
                          /*attestationAddInfo: ri!attestationAddInfo,*/
                          parentAttestationAddInfo: ri!parentAttestationAddInfo
                        )
                      },
                      showWhen: local!activeStep = 4
                    ),

Reply
  • 0
    Certified Associate Developer
    in reply to Mathieu Drouin

    I'm passing this value via a local!Variable to a separate interface , wouldn't it be redundant to save localVariable back to the same Variable?

    Tried this approach as well just to try my luck,  but alas!

    onSuccess:{
                    a!save(local!draftBtnClicked, true),
                    a!save(ri!attestationDetails, fv!processInfo.pv.attestationDetails),
                    a!save(ri!questions, fv!processInfo.pv.questions),
                    a!save(ri!reminderEmailDetails, fv!processInfo.pv.reminderDetails),
                    
                    a!save(local!initialReminder, local!initialReminder)
                    }

    Here's how my sectionLayout that hold the particular screen is: Is this a wrong approach?

    a!sectionLayout(
                      contents: {
                        rule!EA_captureReminderDetails(
                          attestationDetails: ri!attestationDetails,
                          initialReminder: local!initialReminder,
                          adhocReminderEmail: local!adhocReminder,
                          isModifybuttonSelected: local!isModify,
                          /*attestationAddInfo: ri!attestationAddInfo,*/
                          parentAttestationAddInfo: ri!parentAttestationAddInfo
                        )
                      },
                      showWhen: local!activeStep = 4
                    ),

Children
No Data