on 07-30-2010 8:12 AM
Hello experts,
I have inserted a decimal field without default binding in my adobe form. Now I try to implement a dynamic binding of this field. So I inserted javascipt code in "initialize" of this field as follows:
this.bind.match="dataRef";
this.bind.ref="DATA[2].field1";
I got no syntax error and no output data. If I fill the default binding of the binding-tab of this field like
DATA[2].field1
I will get the correct output data!
Do you have any ideas, whatu2019s wrong?
Thanks
M.Albrecht
Hello expert,
thank you for your suggestions to solve the problem.
There is one important point, which squeeze me not to change the ABAP coding. The ABAP which collect the data for the form must not be changed! It feeds a SMARTFORMS form and it should feed an AdobeForm in future as well. With a customizing flag I will change between SMARTFORMS and AdobeForms. So I am forced to use the data source for AdobeForms as well.
When I process a table with body and footer I have only one problem: always in the last record of the table I must print some values in the footer. I know that a static binding to the last record in footer will bring the correct output. But the tables have different number of records, so that I thought a dynamic binding which I can change at runtime could be the solution.
But now I think that this isn't possible. So I will try to feed the footer-fields with javascript when the last record of the body is processed. I will post my solution as soon as I have implemented it in the form.
Thanks to all!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please keep conversations civil. What is considered arrogant by one person, may be considered banter by another.
Now, I've not done Adobe forms for a long time - I even had to look up the transaction - but though you can't change the abap that supplies the data, can you not add ABAP into the interface to do the additional work?
Yes, you are right! I was a little bit exercised about this kind of conversation. Maybe this is due to the fact, that I am new in a forum.
Your suggestion to add the ABAP in the interface is a very goog idea. I will implement this solution! In the mean time I had worked out a solution with javascript. But this variant is no good way, because the performance will be more bad. When you print many hundreds of forms you will see it.
So I decided to implement your suggestion and expand the interface.
Thank you!
Hello, I wonder how did you like our suggestions and how did you solve your problem? We expect you share the solution with us. To provide feedback is a part of good manner here. Regards Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi M.Albrecht,
For me, if i want to dynamic change the value during runtime i will directly assign the value using rawValue property.
if( <condition>)
this.rawValue = DATA[2].field1.value;
Hope this helps.
regards,
Xiang Li
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check the Adobe forums....the Livecycle forums on the official forums or better yet, check the Javascript forums on www.acrobatusers.com/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have enever tried this, so cannot provide a "proper" solution.
But why don´t you create few fields with the static binding and create a field with no binding but with script which copies the value from one of the fields with value (from the static binding) at runtime? Based on the condition...
Or you can directly assign the value into the field from different parts of the context without the extra fields suggested as option one and address the context value you need the value from in the script directly.
regards Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, thank you for your advice. I have already tried this, before I posted my problem and it works. But that's no good solution for my core problem. I didn't mention it but basically I want to print a table with x body-lines and one footer. The values in the footer line are part of the last record of the table! So I looked for a solution to access the last record of the table dynamically at runtime.
Then you didn´t read any of my zillion posts about it, nor the blogs and didn´t get how the forms work.
If you want to have things separated in the layout you´d better separate them in your data, means: use your background coding (ABAP) and an extra DDIC definitions to separate the table into a table and a structure (single row) what will make all things much easier for you in the form design phase.
Regards Otto
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.