Hi,
I'm attempting to create a Data Connection that allows the user to select from approximately 2000 attributes. Presently, my web service operation request takes in an ID value and returns an object encapsulating these 2000 attributes.
If for example I have a "firstName" attribute is it possible to have 2 instances of this field on my form but associated with different request IDs?
If so, how do I go about this?
Thanks.
Solved! Go to Solution.
Views
Replies
Total Likes
I assume that the workitemID is unique for eachweb servce call made ...correct. So in fact you are making two different web service calls and want to bind the name to the same field but maintain the data from the previous call right?
Paul
Views
Replies
Total Likes
You will not be able to return an object as Acrobat/Reader will have no idea what that object is. You can only return simple types. Or you could return XML and load that into the DOM and parse it to get the values you want.
Paul
Views
Replies
Total Likes
Thanks for your reply. My WSDL operation does return an object which contains all these attributes as simple types. So I then have a list of these attributes for selection from the Data View. I presume if they're there for selection that they will be bound when the web service response is returned?
Regardless how can I solve the problem outlined in my original post?
Thanks.
Views
Replies
Total Likes
Are they being returned as 2000 individual nodes or one node containing XML with 2000 attributes?
I guess a better way of asling this woudl be in the DataView in Designer do you see 2000 nodes to bind to or a single node (that may contain upto 2000 attribute values)?
Paul
Views
Replies
Total Likes
If I'm understanding the term "node" correctly then I have one node with 2000 attributes.
I've attached a screenshot of my Data View to make sure I've answered this correctly.
Views
Replies
Total Likes
Then you shoudl be able to simply bind to the fields you need.
Paul
Views
Replies
Total Likes
OK, but just in reference to my original query how do I go about having 2 instances of a "firstName" field on my form but associated with different request IDs?
So potentially on my form, the 2 firstName fields would have different values.
Where can I get more information on doing this?
Views
Replies
Total Likes
Each firstname field will be unique by the expression that is used. If the field is not in a repeating section then the field itself will have an occurance number (i.e. firstName[0]).
So simply drag and drop the node you want onto the field and you shoudl be good to go!
Paul
Views
Replies
Total Likes
Thanks. Where can I get more information on these expressions that you refer to or where are they entered?
Views
Replies
Total Likes
It is described in the help but it is not easy to find. If I get confused and I am unsure I simple write a simple command to have the SomExpression determined for me. I use this ocmmand to get the value then adjust my script accordingly:
app.alert(objectname.somExpression);
This will return the full path (include instance numbers) of the object identified in the command.
Views
Replies
Total Likes
I'm sorry but I'm not sure I'm grasping this fully.
I see if I drag on 2 firstName fields onto the form that one has an instance number of 0 and the other an instance number of 1.
But as these fields both belong to the same Web Service operation then surely they will contain the same values on population when the response is returned?
I want them to contain different values, say "David" if the workItemID in the request is 245 and "John" if the workItemID in the request is 467 etc.
Is it possible to configure this approach? Just want to clarify this.
Views
Replies
Total Likes
I assume that the workitemID is unique for eachweb servce call made ...correct. So in fact you are making two different web service calls and want to bind the name to the same field but maintain the data from the previous call right?
Paul
Views
Replies
Total Likes
Yes, that's it. The workItemID is indeed unique.
So I want to have 2 "firstName" fields on the same form that are effectively populated with data from 2 separate web service calls.
Views
Replies
Total Likes
The binding that you are doing assumes that you will have a one to one mapping hence you woudl need a unique data connection for each web service call that you want to make. The Form Design does not support a dynamic bind so you cannot change it after th eform is rendered. So the way I solved this was to return all of the data in a single field in the WS as XML. I could then load the XML into the data dom and map the values of the data to th efields by script.
Paul
Views
Replies
Total Likes
Thanks for your explanation. In this case, just to clarify, would the Data Connection in this case be an XML file or are you suggesting to say return an array as part of the Web Service incorporating all Work Items? (not too sure if the latter works)
Views
Replies
Total Likes
I woudl return a string that represents an xml structure that includes all work items. You may have to wrap it in a CData section so that the rest of the SOAP envelope does not get confised.
Paul
Views
Replies
Total Likes
I've had a look now at the SOM Expression Specification.
If I return all workItemIDs say is it possible to use an expression to select the workItemID that I am interested in?
As far as I can see the array notation must be numeric, so you'd need to know what order the Work Items have been returned in.
Is there any notation similar to a "where workItemID = 'ABC'" clause?
Thanks.
Views
Replies
Total Likes
Not by default...there may be something in XPath for that (I am no expert in XPath) but that would be it.
Paul
Views
Replies
Total Likes
OK, I presume so XPath is supported as a method for binding fields to XML elements etc? I didn't see any mention of it in the SOM Specification.
Views
Replies
Total Likes
No XPath is not supported on the client ...only on the server. Sorry if I mislead you.
Paul
Views
Replies
Total Likes
No worries...but I am a bit confused now. Do your replies (numbers 13 and 15) above apply for the client or just the server?
If not, is there any way around this for the Adobe LiveCycle Designer client?
Thanks.
Views
Replies
Total Likes
Views
Likes
Replies