on 02-25-2010 9:57 AM
Dear all,
I'm new in adobe and I don't really know to use "XFA" syntax
In my "XML", I have
<TT001L>
"<DATA xfa:dataNode="dataGroup">"
" <WERKS>FR01</WERKS> "
" <LGORT>FR01</LGORT> "
" </DATA>"
"<DATA xfa:dataNode="dataGroup">"
" <WERKS>FR01</WERKS> "
" <LGORT>FR11</LGORT> "
" </DATA>"
"<DATA xfa:dataNode="dataGroup">"
" <WERKS>FR02</WERKS> "
" <LGORT>FR21</LGORT> "
" </DATA>"
I have 2 dropdownlist in my form DDL_WERKS and DDL_LGORT
I would like to link the 2 DDL : if I choose a value in DDL_WERKS (for example FR01), I would like to have the corresponding value in DDL_LGORT (in my example : FR01 and FR11)
I know how to manipulate and access to the field in the form but I don't know how to access to the data model with the "XFA" syntax
Could you please help me to do that
Thanks a lot
Veronique
I work with SFP transaction
In my script if I put on Change method on DDL_WERKS :
var o_items = xfa.resolveNode("$record.TT001L_SITE.DATA.LGORT").value;
xfa.host.messageBox("text" + o_items);
the o_items has the first item of my DDL_LGORT
How to have all the occurence of TT001L_SITE in a variable ?
Thanks to help me
May be I don't take the problem with the right way but how do ?
Edited by: veronique pinelli on Feb 25, 2010 3:53 PM
Edited by: veronique pinelli on Feb 25, 2010 3:53 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I could manage my form with a WD but for functionnal and organisationnal reason of business, we decide to use SFP transaction.
It is just a choice of workflow in the process.
thanks a lot for your help.
Veronique
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any WebDynpro is not working with your form?
Then you should use the trace to see if you´ve passed the data into the form correctly (if you can see the data in teh trace, it means that the problem is not in the backend, but in the form, when you cannot seee what you expect in the generated form).
Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I'm not sure to understand your discussion about WD.
I don't create the ADOBE form from a WD.
I'm working with the SFP transaction.
Do I do something wrong if I use SFP transation with my code or something else ?
I talk about the XML file because I have done a trace and I can see the data in the XML file.
Thanks
Kind regards
Véronique
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I understand, but I wanted her to understand. It is important that she is developing WDA (where you can get that automatically generated), but there were guys around here who were working with offline forms with XML interface and were struggling a lot. I am glad it is clear and solved now, Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yyyesss ....
Thanks a lot Virani for your last reply !!
It saves me !!
I adapt the code and I think it can be improved but it works like that :
var nNewSel = this.boundItem(xfa.event.newText);
var w_node = xfa.resolveNodes("xfa.record.TT001L_SITE.DATA[].WERKS[]");
var wlength = w_node.length;
xfa.host.messageBox("lg all: " +wlength);
storloc_site.clearItems();
for (var i = 0; i < wlength ; i++) {
if ( w_node.item(i).value == nNewSel ) {
var l_node = xfa.resolveNodes("xfa.record.TT001L_SITE.DATA[" + i + "].LGORT[*]");
var llength = l_node.length;
xfa.host.messageBox("lg lgort: " +llength);
for (var j = 0; j < llength ; j++) {
// insert values of Leave to 2nd drop down
storloc_site.addItem(l_node.item(j).value, l_node.item(j).value);
}
}
}
Thanks
Kind regards
Véronique
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I searched a long time, I found the example I linked but it didn't work in my form.
So may be I can ask you another simple question and after I will understand :
Could you tell me for example how I can do :
I have one dropdownlist binded on an SAP table (TT001L with 2 fields WERKS and LGORT),
My dropdownlist is binded on LGORT to display the text and value of it.
How I can do if I want to display the corresponding WERKS value (in a message box to be simple) when I select a value in my DDL on LGORT
Don't hesitate to tell me if it is not clear.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Otto,
thanks for your help.
I know the algorithm to use but I don't know how to code it. How to find the all the corresponding value of DDL_LGORT regarding the value choosen in DDL_WERKS because there are both binding into the same data
thanks
kind regards
Véronique
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Where to start with scripting:
http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf
Note that in the JS doc there is a last chapter with typical problems and their solutions. You can just copy and past that if that fits your needs.
About the DDs: the script will work like this:
var sel = ddl1.selectedIndex
if (sel == 0) {
//you need to know which values are to be availale in the second DD, how many items and conditions do you have?
//who and how will maitain this? what would happen it somebody wants (a manager) to display FR21 for FR01?
//is there any customizing? is there any table to get this from?
clear DDL2 values first
loop at the values which will be display in the DDL2
for each value, add it into the DDL2
}
else if (sel == 1)...
Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I want to link the 2 DDL
I want to populate the second DDl (DDL_LGORT) in function of the value selected in the first DDL (DDL_WERKS)
For example, if I choose FR01 in the first DDL_LGORT, I would like to have only FR01 and FR11 in DDL_LGORT
if I choose FR02 in the first, I would like to have only FR21 in the second
It is as explained in the help, but I tried to do the same and it didn't work.
And I would like to understand how to access to the data view : how to mix xfa.resolveNode + xfa.record and how to code in javascript xfa.record to access to the correct node and field
thanks for your help
Véronique
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don´t understand. You need to copy the selected value from the dropdown to another field?
Or to have two same dropdown where onselect in first one will select the same line in the second one?
Or you just need to change the values that are display at the beginning... In that case I would recommend you not to do that through scripting but to do that in your backend - do some ABAP coding in the interface initialization or when loading the data before you call the ADS to generate the form for you.
Regards, Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think I don't ask correctly my question or may be I don't really know how it works.
I bind my 2 DDL with the data view TT001L.DATA[*] in the object palette
for DDL_WERKS, I bind the text and value with WERKS
for DDL_LGORT, I bind the text and value with LGORT
Regarding the example and my XML data :
At the beginning I had in the first DDL
FR01
FR01
FR02
In the second DDL, I have
FR01
FR11
FR21
I write some script in the initialize method of DDL_WERKS to delete the duplicate values and now I have
FR01
FR02
But now I need to link the 2 DDL and I don't know which script I have to write to do that (in javascript)
I tried as the help said but without success
May be the definition of my object in the form are not correct
Thanks
I hope it is clear now for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I don´t uderstand why do you work with XML. You send the data into a form thorugh the interface/ context and can access these values in the LiveCycle designer visually. There is a binding tab for every form field.
Or you need to script soemthing? Please clarify.
Regards, Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Otto,
I believe the reason she's using XML is because when developing forms through ABAP Web Dynpro, it's much easier to use an XML generated interface rather than a Data Dictionary Based interface.
With an XML generated interface, anytime you add a field/structure/table to your Context, your XML is automatically updated for you - this is great!
Using a Data Dictionary based interface, you have to manually add those new elements making sure your TYPE them to some DDIC object.
With XML generated interface, you can define new elements "on the fly", thereby reducing development time dramatically.
I know you have a ton of experience with Adobe forms in regular ABAP, and if I remember correctly, you're just starting out with Web Dynpro.. if that's the case, you'll enjoy WD development more. feel free to contact me anytime regarding WDA Forms.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.