Question T17436
Visible to All Users

Condition is not executing for setValueIf and resetValueIf.

created 10 months ago

Hi,

I have set condition for setValueIf and resetValueIf as I mentioned in attached screenshot and while previewing the survey, it is not executing conditions. This is working for all other logic, only not working for this two. It is not going to FunctionFactory.Instance.

So, any other approach has to be follow for such pop up.

Thanks in Advance!

Comments (3)

    Hi,
    In order to be executed, the setValueExpression should contain other survey questions. Consider the following sample demo:

    JSON
    { "pages": [ { "name": "page1", "elements": [ { "type": "boolean", "name": "question1" }, { "type": "radiogroup", "name": "question2", "setValueIf": "{question1} = true", "setValueExpression": "'Item 1'", "choices": [ "Item 1", "Item 2", "Item 3" ] } ] } ] }

    Let me know if it works.

      Hi Jane,

      Thanks for your reply.

      Our scenario is little different, we are having a custom function which returns true/false as return value.

      If we add that custom function against the setValueIf or resetValueIf property then we observed that custom function is not even getting called itself.

      Thanks,
      Ramkumar More

        Hello Ramkumar,
        Thank you for clarifying. I'd be in a better position if you could share a sample survey JSON and a custom function definition and clarify which result you expect to get.

        Thank you