cancel
Showing results for 
Search instead for 
Did you mean: 

Can a code in FormCalc Or JavaScript be reused

0 Kudos

Hi,

Does somebody know if we can share / reuse existing code like JavaScript Function or FormCalc between

different forms ?

Thanks !

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

Hi,

I had success when I now have a form with two script objects and I can easily used both of them

1. Local

2. Referenced ( Script Fragment )

The position of the script objects must be under the Variables node.

0 Kudos

Hi,

Great, So Script Objects can be shared and reused within the form and between different forms

Thanks !

chintan_virani
Active Contributor
0 Kudos

Share the solution as well once you have implemented it. All the best.

mh97
Contributor
0 Kudos

Hi Oren,

We did something similar recently, using a Fragment Library on a shared drive. One of our fragments includes javascript and it works fine.

However, we only found how to use fragments as embedded, not referenced. Still that allows you to code once and easily pull the fragment into other forms. (Referenced would mean changes to the fragment in the library would show in all referencing forms. We don't know how to do that. If you figure it out please post!)

Let me know if you would like more details.

Hope this is helpful!

Margaret

0 Kudos

Thank you for your input. Still, Can a javascript function / formcalc be used

a couple of times in the same form ?

chintan_virani
Active Contributor
0 Kudos

I would differ from what Bjagdishwar commented as it is possible share script objects via Fragments (from Designer 8.1 onwards) across forms as well.

I have not used it personally you can go through the ALD help on it.

jagdishwar_b
Active Participant
0 Kudos

>>if we can share / reuse existing code like JavaScript Function or FormCalc between

different forms ?

No,

if you want to reuse, the only option is you have to copy the javascript or formcalc code from one form to another.

javascript/formcalc fall under client side scripting (as part of the form, as opposed to server (ADS) )

regards,

BJagdishwar.