Add additionalScope gui input fields in event handlers

This is great post, thanks for it. Just curious if there is any plan to pass additional scope from gui -> control query.
image
That would simplify the process and we won't have to rely on run script everywhere.
Thanks

1 Like

Hey @mpmohi! Thanks for reading and for the kind words :slight_smile:

And actually, I think we may have just pushed this feature (to go live with our next deploy, likely sometime next week) :eyes:

3 Likes

WoW, that would be a very nice feature I am sure many user will appreciate this.

Thanks again for your hard work. keep it up :smiley_cat:

1 Like

HI, is this in roadmap yet?, would be really useful to set additionalScopes in GUI, like a text field to do something like

{scope1: "val1", scope2: "val2"}

+1
This would be usefull

Hi, one problem I was having was that the passed additionalScope key cannot be the same as an existing name of other elements. I have added Param suffix to distinguish it from existing controls and it worked:

JS script:

query.trigger({
    additionalScope: {
      control1Param: ProjectData.data.ProjectID[0],
      control2Param: 'something else',
      createdUserParam: current_user.fullName,
      createdDateParam: moment().utc().format("YYYY-MM-DD hh:mm:ss"),
    },
    onSuccess: (data) => {
      console.log('Success ' + JSON.stringify(data));
    },
    onFailure: (error) => {
      console.log(`Duplication failure: ${error}`)
    })

sql server query:


  EXEC dbo.mystoredprocedure {{ control1Param }}, {{control2Param}}, {{ createdUserParam }}, {{ createdDateParam }};
2 Likes