Skip to main content
Known Participant
Jan 11, 2023 11:49 AM UTC
Question

Refresh from expression rule

Hi Everyone,

I am quering the data from table and stroing it into local variable. On button click I am refreshing the data using refresh varibale parameter refreshonvariablechange , but the variable gets changed and data is not refreshing. Could you please help me out?

    13 replies

    konduruc733182
    Inspiring
    Jan 11, 2023 12:20 PM UTC

    Hello shubhamy0005,

    Try using the below format for your refresh variable

    a!localVariables(
      local!batchsize:5,
      local!refreshcomments,
      local!comments: a!refreshVariable(
        value: rule!JA_QE_GetComments(
          pagingInfo: a!pagingInfo(
            1,
            local!batchsize,
            a!sortInfo(field: "your ID", ascending: false())
          ),
          feedId: "Your Data Id"
        ),
        refreshOnVarChange: local!refreshcomments
      ),
      {}
    )

    replace values as per your requirement/data (Query expression)

    also follow this link for more information

    docs.appian.com/.../Local_Variables.html

    Known Participant
    Jan 11, 2023 12:37 PM UTC

    HI Kondoru, I use same format but data from expression rule does not refresh.

    Participating Frequently
    Jan 11, 2023 2:09 PM UTC

    This only works in interface objects, not in expression rules.

    docs.appian.com/.../fnc_evaluation_a_refreshvariable.html

    Known Participant
    Jan 11, 2023 2:55 PM UTC

    Hi Laurens, Please suggest how to fix this?

    konduruc733182
    Inspiring
    Jan 11, 2023 2:57 PM UTC

    Can you please share your code or provide a screen shot for a better understanding here