Q1 - You can bind a node in your XML to multiple fields on your form....and the value of that node will show up in all of those places where it is bound. So PartNo in the data can be bound to multiple tables that have a partno.
Q2 - No ....there is always a security concern when Reader has to go outside of its sandbox. You can get that XML file from a soap call then load it into the dom via commands but an xfa.importData command will not load anything without the user intervening (i.e. choosing the file). You can combine the data and form and the server ...if you are rendering through Form Server though....but once the form is rendered getting external resources can only be done through ODBC or SOAP.
Q3 - There is nothing automatic ....you woudl have to do this through script. Add a row in the 2nd table, assign the values for each field that you want to move from Table 1 to Table 2, Remove the row from the 1st table.
Thanks again for the response.
Q1: If I have a join table - given that I have a many - to - many relation with multiple autos and multiple parts
How do I connect the partNo to the description in the table from the xml
If I create a table that I want to have
... year etc
Automobile Model #, Make, ....
PartNo | Part Description | Order Button
I can bind joinAutoPart table to the Automobile header, but how to I convert that to a text Model Name vs a number
I can join PartNo to the entries of a table, but can I fill the descriptions of each
I want to do select partdescription, colorOptions, etc from partTable where PartNo = part1 then use those values - using binding or xml syntax
I can reform the xml from my data to be the following, but this requires a lot of duplicate data and is very error prone to have one part name or number that is one off
Ideally, I would like to have a dropdown box where the user selects say a model name. Then it builds a list of tables from an xml file - so there are a few common tables - like t-shirts, coffee cups etc that would show up on every form and the rest are dynamic.
For ODBC, am I correct in thinking that the link has to be established at the client to the server outside of reader before a connection can be made within reader?
Q3: I am doing the add programatically, but if I have a part number from a built xml with many tables - is there a way to identify which table it is coming from?
I don't on the order form have | ModelNumber | PartNumber, so I don't have an easy way to reference back. And if I did I would still have to do multiple linear searches. I assume the performance wouldn't be too bad, but it is not pretty.
i = 0;
while(i < (ModelTableForm.count-1))
if (xyz.resolveNode("foo[" + i + "]").modelNumberField.rawValue == modelNumber)
j = 0;
while(j< (abc.resolveNode("bar[" + i + "]").count-1))
if(abc.resolveNode("bar[" + i + "]").partNumberField.rawValue == partNo)
abc.resolveNode("bar[" + i + "]").addButton.prescence="visible"
I was hoping for an extra field or way to extend the row object I could add referringNode or something to that effect and just say OrderRow.refferingNode.button.presence = "visible"
I think I found one way to get around this. I think I can create 0 width colums for indexes to the tables
That way I could say xyz.resolveNode("foo[" + modelIndex + "]").abc.resolveNode("bar[" + partIndex + "]")
Q1 - Not sure that I follow (I am not a DB expert by any stretch) but my inderstanding is that the SQL command you
come up with will return a certain XML structure and everything you need must be somewhere in that structure. If you need something to appear in multipl places you should be able to bind the same node in the XML to multiple fields in the form.
Q2 - Yes an DSN must be set up and accessible to the program from the OS before ODBC can be used. Also if you are using Reader then the form must be Reader extended. I do not recommend this. I would prefer a SOAP call to retrieve the information (no mods on the client needed) but you wil still have to Reader Extend to allow a soap call to be made.
Q3 - short of keeping track of it yourself (i.e. write the soure for the row in a hidden field) I do not see a way for you to get this. You can get access to the binding instruction and you may be able to parse that to get the source for this (note that you cannot modify it - read only). That will depend on how you setup your binding.
Q1: Sorry if it was confusing, I was just using SQL as an example for how I would grab the data if I could get it from a database. I have to get it from the XML and it doesn't accept SQL queries from what I can tell.
Is the xml file is kept active in a DOM within reader? Are there functions to access it? so I can jump down it to get specific data, or build the tables? I guess I thought the data was read in and the xml file was closed at the end.
Q2: I am not sure about the SOAP call I will have to see if we have the resources to configure it. Does it handle failover? - can I revert to a less complex form if it cannot make the connection?
Q2 - Depends how you build it. If the SOAP call fails it will time out and you can trap it and report accordingly. Then you coudl continue in the form without that data (if you permit it).