Question T9061
Visible to All Users

How to check the event that replaces the questions names if changed

created 3 years ago

Hello

We have implemented our custom expression executor that requires the following syntax: [question1] == “test”. (In SurveyJs: {question1} == “test”)

We can configure our expressions in the designer with that specific syntax, that's fine, but SurveyJs has a clever feature that updates all the expressions if a question’s name is changed for example in my case question1 become Montant, since the expressions has specific syntax SurveyJs will not find the old name because it is between brackets.

So my question, how can I check the event that will be fired to update all the expressions when a question’s name is changed?

Thanks a lot

Answers approved by surveyjs Support

created 3 years ago

Hello,
Here is the function you need.
In fact you need to override this function.
I think we can allow to override this function. By the way, what is other difference do you have in your engine except brackets?

Thank you,
Andrew
SurveyJS Team

    Comments (3)

      Hi Andrew,

      Our expressions will be evaluated server side (this is a requirement of our Expression module) so we need only to put questions between brackets, if you can share with me an example to override the methods "renameQuestionInExpressio" and/or "wrapTextByCurlyBraces" it will be great for us

      thanks a lot

        Hello,
        I have implemented this functionality for the next release. Please rely on this GitHub issue.

        Thank you,
        Andrew
        SurveyJS Team

          Thanks a lot, I'll wait the next release, this is what we need currently