Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

inject script into a fragment at run time

Avatar

Level 4

Hi,

Consider we have form containing self scripted fragments. Is it possible to change the event scripts of the fragments at run time from the main form?

I tried to use

...event__initialize.script.value = `  `

...execInitialize();

but it did not work.

4 Replies

Avatar

Level 10

No you cannot do that ....maybe if you coudl describe why you want to do this we could suggest an alternative.

Paul

Avatar

Level 4

Basically, I have a fragment with radio button exclusion group. And this radio button has a default value (we have 3 values) set by script.

I want to remove default value setting without touching the fragment code from the main form.

Avatar

Level 4

Actually, this was not such a good example for my problem, because I can set it to null in the form:ready event:

this.RadioButtonGroup.Option3.rawValue = null;

In essence, what I need is accessing the event scripts on the objects, subforms.

Avatar

Level 10

You woudl have to modfiy the xdp source of the fragment (it is only XML) before the fragmen reference is resolved in your main line form.

Once it is rendered you will not be able to modfiy the script.

Paul