XML import into floating fields issue
Probably missing something obvious, but my searches are coming up blank. Here's the workflow I'm shooting for:<br /><br />-Create form1 in LCD<br />-User fills out form and submits via email the XML data<br />-Create form2 in LCD that uses floating text fields to create a dynamic text document based on the info in form1<br />-Import XML data from form1 into form2<br />-Print form2<br /><br />Most of it works, but there is a subform on form1 that form2 doesn't import the data from.<br /><br />The XML winds up like this:<br /><variable1>Variable 1 Info</variable1><br /><variable2>Variable 2 Info</variable2><br /><subform><br /><variable3>Variable 3 Info</variable3><br /><variable4>Variable 4 Info</variable4><br /></subform><br /><br />In this example, form2 properly imports variable1 and variable2, but ignores variable3 and variable4. Manually removing the <subform> tags yields the desired result.<br /><br />Something in the text field binding in form2, maybe?<br /><br />Thanks in advance,<br />SyddyS
The answer appears to lie in the hierarchy and naming. All forms, pages, subforms, etc. have to be named exactly the same and have the same hierarchical flow for the floating text fields to bind properly to imported data. This kind of blows for my purposes, as "form2" had my text fields spread across multiple pages and multiple subforms. Naming all the subforms the same as the subform in "form1" made the first one work, but none of the subsequent.
If anyone has any alternative thoughts, I'd appreciate it. My workaround is to put ALL of my text fields in form1 on the same level, and then call them out one by one in the scripting to make the ones I want visible or hidden. Wrapping them in a subform just causes too much trouble down the line. Ugly, but functional.
Thanks,
SyddyS
Similar Messages
-
Mapping complete input XML structure into one field on target
Hi,
I have a scenario where I need to map the complete input XML structure as it is, into one field on target side. so can we achieve this in Graphical Mapping? If yes, please share your valuable info.
Regards,
Shiva.Hello,
this is the java map code.just compile it and made a .zip file import it and use it Interface Mapping.
import com.sap.aii.mapping.api.StreamTransformation;
import com.sap.aii.mapping.api.AbstractTrace;
import com.sap.aii.mapping.api.StreamTransformationConstants;
import java.util.Map;
import java.io.*;
public class PayloadToXMLField1 implements StreamTransformation {
String strXML = new String();
//Declare the XML tag for your XML message
String StartXMLTag = "<DocumentBody>";
String EndXMLTag = "</DocumentBody>";
//String StartXMLTag1 = "<Code>";
//String EndXMLTag1 = "</Code>";
AbstractTrace trace;
private Map param = null;
public void setParameter(Map param) {
this.param = param;
public void execute(InputStream in, OutputStream out) {
trace =
(AbstractTrace) param.get(
StreamTransformationConstants.MAPPING_TRACE);
trace.addInfo("Process Started");
try {
StringBuffer strbuffer = new StringBuffer();
byte[] b = new byte[4096];
for (int n;(n = in.read(b)) != -1;) {
strbuffer.append(new String(b, 0, n));
strXML = strbuffer.toString();
} catch (Exception e) {
System.out.println("Exception Occurred");
String outputPayload =
StartXMLTag
+ "<![CDATA["
+ strXML
+ "]]>"
+ EndXMLTag;
try {
out.write(outputPayload.getBytes());
trace.addInfo("Process Completed");;
} catch (Exception e) {
trace.addInfo("Process Terminated: Error in writing out payload");; -
Multiple XML import into one PDF
I want to import multiple xml files into my form at one time resulting in one pdf with each page repeating with each set of data. Is there a way to do this?.
Hi,
You can use loadXML method to load necessary XMLs, after that you have parse it, take data, and set it to correspondent fields.
You can check this links, maybe it will be helpfull:
http://forums.adobe.com/thread/333519
http://livedocs.adobe.com/livecycle/8.2/acrobat_designer/wwhelp/wwhimpl/common/html/wwhelp .htm?context=Adobe_LiveCycle_Designer_Help&file=001719.html
BR,
Paul Butenko -
Mapping an XML structure into one field
Make use of XSLT mapping (available on SDN...just search with CDATA...i think there is a new feature in PI7.1 (Copy XMl to subtree....something like that).
Regards,
Abhishek.Hi,
Chk this:
/people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
Re: Conversion of source XML structure to single string using PI 7.1
Thanks
Amit -
Tree component and loading xml files into text field
Hello and thank you for taking the time to read my issue....
I am making a simple self help application. I have a tree component that loads the different catagories and topics for my help app dynamically via an xml file...no issues there.
I then want it so that when the user cliecks on the actual topic that the TextArea component will load the info from another xml file using the name of the topic as the name of the xml file to make it that much easier for anyone to maintain this program.
So far the code i have is this.
myTreeListener.change = function(eventObject)
var theSelectedNode = eventObject.target.selectedNode;
var theSelectedNodeLabel = theSelectedNode.attributes.label;
topicTextArea.text +=
I am a little fuzzy when it comes to loading the xml file in. Should i be loading html instead of xml is my other question as well?
Thanks in advance for your help
FGCheck out the Oracle XDB Developer's Guide, Chapter 3. There is an example of using BFileName function to load the xml files from a directory object created using create or replace directory. It works really well.
Ben -
XML import to change field state
I am importing xml into a form. I have some if expressions to change the state of a field based on the value of xml fields. Here is my expression for the color - initialize event: if (Lv= "blue"){ this.fontColor="0,0,204"; }else if (Lv = "black"){ this.fontColor="0,0,0";} Lv is a field from the original form. Here is what's going on - the first fontColor value in the expression gets applied no matter what Lv is equal to. So in this case, the fontColor ="0,0,204" gets applied even if Lv="black". It's almost as if the event is ingoring if expression and just pickng up the "this.fontColor" statement. Any ideas?
Hi,
In your if statement try a double ==, which you use when testing equality. Also if there are only two incoming colours, you could drop the other if statement and just run with an else.
if (Lv.rawValue == "blue")
this.fontColor = "0,0,204";
else
this.fontColor = "0,0,0";
Good luck,
Niall
My bad: It depends on how you are bringing in the XML, but I presume Lv is one field receiving XML data. Because the language is javascript, you will need .rawValue for the Lv field. -
Examples of hwo to insert an XML file into a field which is of type CLOB
I am trying to use the following command, but it does not work, due to a type issue, anyone have another example?
INSERT INTO TEST VALUES (xmltype(bfilename('c:\', 'c:\test.xml') , nls_charset_id('AL32UTF8')));I get the following error, probably means the file referenced is not available...
SQL Error: ORA-22806: not an object or REF
22806. 00000 - "not an object or REF"
*Cause: An attempt was made to extract an attribute from an item that is
neither an object nor a REF.
*Action: Use an object type or REF type item and retry the operation. -
LC ES 8.2.1.3
I have a web service that outputs XML data and Designer calls the webservice and the XML data populates a text field. This works fine.
My problem is getting the data out of the text field to populate different fields in my form. I have done many searches and have tried many different things but still can't get the data out. I have made sure my form is dynamic xml.
Here is the last thing I have tried:
-------Begin Code -----------
Placed in testData:Intialize and the connectionSet is placed in Page1:Initialize.
var myXML = XMLData.parse(xmlData.rawValue, false);
var subNames = XMLData.applyXPath(myXML, "//Subordinates/Subordinate/full_name");
if (subNames == null) {
//no data
} else if (subNames.length == null) {
//not array, just a single value
topmostSubform.Page2.testData.addItem(subName.value);
} else {
for (var i = 0; i < subNames.length; i++) {
topmostSubform.Page2.testData.addItem(subName.item(i).value);
-------End Code -----------
I have been working on this for 3 days and still can't get it to work. The closest I have come is output in my testData text field that said "Object23485968".
Thank you in advance for your help
JohnI must be missing something somewhere becuause I couldn't get it to work. Here is the xml that I am getting back when I invoke the CFC from within Workbench. This data is assigned to an XML type varialbe called 'xmlOutput'. I then create a data connection in my form to the service I created in Workbench and bind the return data to a text field (with multiple lines). When I bind the data I have the option to choose "document" or "element". Element doesn't return anything, unless I am doing something wrong, so I have to choose Document.
With the xmlOutput below I do get more than one subordinate returned. I only showed one for simplicity.
------------Begin xmlOutput -------------- (Yes, I am getting all of these empty lines in my output)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://livecycle" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:getSubordinatesResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<getSubordinatesReturn xsi:type="xsd:string"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<subordinates>
<subordinate>
<cost_center_code>123456</cost_center_code>
<cost_center_description>Business</cost_center_description>
<department_code>99</department_code>
<department_description>Information Technology</department_description>
<department_head_emp_id>987654</department_head_emp_id>
<employee_id>456789</employee_id>
<first_name>John</first_name>
<full_name>Public, John</full_name>
<hourly_rate>5.350</hourly_rate>
<job_code>PMBAPP</job_code>
<job_title>Business</job_title>
<last_name>Public</last_name>
<lives_in_state>AK</lives_in_state>
<location_code>ANCH</location_code>
<location_description>Anchorage</location_description>
<network_user_id>JPublic</network_user_id>
<pay_group_code>KMH</pay_group_code>
<rate_type_code>S</rate_type_code>
<reports_to>789123</reports_to>
<territory_code/>
<tier>1</tier>
</subordinate>
</subordinates
------------End xmlOutput -------------- (Yes, I am getting all of these empty lines in my output)
I am really at a loss on how to get this data into my form.
Thanks,
John -
Hi,
I know there's a bug on Mac about this, does anybody knows if is there another way to do it?
I'm importing an XML file and I need to transform it with an XSLT stylesheet.
Here's the code:
var xmlFile = new File("/User/Desktop/product.xml");
var xsltFile = new File("/User/Desktop/stylesheet.xsl");
with(app.activeDocument.xmlImportPreferences){
transformFilename = xsltFile;
myNode.importXML(xmlFile);
Pretty simple but ID is missing my xsl file...
I'm really bored about this, hope there's an alternative solution...
Thanks anticipately.Hi Thomas
I've learnt a lot since my last posting, so thanks for putting me on the right track then.
I have actually tried what you suggested. I had the same problem with the XML file path when it was hard coded. The object being that I just wanted to replace a static xml doc.
Where I've got set xmlpath to choose file with prompt "Select the XML"
i also had set xsltpath to choose file with prompt "Select the XSLT"
log xsltpath --(this throws the value of xsltpath in to the results pane of AS)
It still didn't work. It showed the correct path to the file but still failed when run through the script. Bizzare!
The only other thing that I could try is to just define xsltpath as "CWtoINDDElements.xsl", due to the fact that I've told InDesign that I'm getting the XML from the same folder in the 'choose' function.
I'm not connecting to my work VPN at 11.50pm, so I'll try again in the morning.
Thanks Thomas. It's great to bounce ideas around.
Best, Andrew -
Read external XML stream into a field
Hello all -
I have been trying to get this working for a week now and still no luck. It seems like it's possible to find field values to external XML file, but Acrobat tries to parse the XML and be smart about it.
I have a custom form logic that needs to read an XML file from a URL and assign the stream to a form field that can later be accessed via FormField.rawValue.
The XML is rather basic - something like
1
2
3
4
I tried the xfa.connectionSet to no avail. I am now trying to bring in that value with SOAP, but have been reading that it might give prompts in Reader.
Can I simply read an external URL and assign the server response to a variable or a field ?
My apologies for the super-basic question!!
Thanks in advance!
FrankI get the following error, probably means the file referenced is not available...
SQL Error: ORA-22806: not an object or REF
22806. 00000 - "not an object or REF"
*Cause: An attempt was made to extract an attribute from an item that is
neither an object nor a REF.
*Action: Use an object type or REF type item and retry the operation. -
XML Import: Hide HTML?
When I import an XML file into text fields in InDesign the HTML markup tags get transfered (are not removed or rendered as an HTML section).
For instance when I import:
<article>
<title>This is a title</title>
<body><p>This is a body paragraph.</p><p>This is another paragraph</p></body>
</article>
OR
<article>
<title>This is a title</title>
<body><![CDATA[<p>This is a body paragraph.</p><p>This is another paragraph</p>]]></body>
</article>
The <p> tags still appear in the InDesign text boxes instead of being converted into InDesign paragraphs or stripped out entirely.
Is there a way to remove or hide the tags when they are imported in InDesign?JTRobinson wrote:
... For instance when I import:
<article>
<title>This is a title</title>
<body><p>This is a body paragraph.</p><p>This is another paragraph</p></body>
</article>
This is correct; those are not HTML tags, but literal characters < and > -- correctly encoded as "<" and ">" -- and then translated into their correct representations, which only happens to look like HTML.
<article>
<title>This is a title</title>
<body><![CDATA[<p>This is a body paragraph.</p><p>This is another paragraph</p>]]></body>
</article>
This is also correct. Any stuff inside a CDATA bracketed section should not be parsed as XML, so this is also plain text. -
No audio in timeline or waveform after XML import. YES audio in source monitor.
I'm collaborating with another editor on this project. He picked out a bunch of selects using FCP. I opened the FCP projcet, exported the selects sequenece as XML, imported into Premiere.
Now, everything is in my premiere project nice and clean, however there's one big problem:
There is no sound in from any of the clips when they are brought into the timeline. If I double click the clips, and bring them into the source monitor, there is sound, plays perfect. None in the timeline, and no signal in the audio waveform. Premiere is also not conforming in the background, so I don't think that's the issue either.
I tried messing around with the audio channels, turning them all to none, back on, etc... no dice.
Any ideas?Without knowing anything about the footage, or the Sequence, it's impossible to know.
If Ann is correct, as to the cause (one possibility), then this ARTICLE might give you more useful info.
Good luck,
Hunt -
Converting float fields to date Time
I have an application that stores datetimes into float fields, the data is formatted yyyymmddhhmmss or 20081122091030. I need to convert this data to a datetime data type so I can do datetime calculations (differences) for reporting purposes. It would be preferable to have the data formatted yyyy/mm/dd hh:mms. I have tried numerous methods with out success. As I understand it I need to CONVERT to a VARCHAR first. I am new to TSQL & this one turning out to be a knotty problem so I would really appreciate anyone’s assistance,
SELECT (
LEFT(CAST(IS_DUE_DATE AS VARCHAR(14)),8) + ' ' +
SUBSTRING(CAST(IS_DUE_DATE AS VARCHAR(14)),9,2) + ':' +
SUBSTRING(CAST(IS_DUE_DATE AS VARCHAR(14)),11,2) + ':' +
SUBSTRING(CAST(IS_DUE_DATE AS VARCHAR(14)),13,2))
FROM ISSUES
However when I try to Covert to DATETIME it all goes pear shaped.Try this
Code Snippet
DECLARE @MyDate float
SET @MyDate = 20090922112143997
SELECT CONVERT(DATETIME,
LEFT(CAST(CAST(@MyDate as BigInt) as varchar(20)),8)+' '+
SUBSTRING(CAST(CAST(@MyDate as BigInt) as varchar(20)),9,2)+':'+
SUBSTRING(CAST(CAST(@MyDate as BigInt) as varchar(20)),11,2)+':'+
SUBSTRING(CAST(CAST(@MyDate as BigInt) as varchar(20)),13,2) + '.' +
SUBSTRING(CAST(CAST(@MyDate as BigInt) as varchar(20)),15,3)
Added using a temp table:
Code Snippet
CREATE TABLE #T
fdate float
go
INSERT INTO #T VALUES (20090922112143997)
INSERT INTO #T VALUES (20090921182143997)
INSERT INTO #T VALUES (20090921012323997)
SELECT CONVERT(DATETIME,
LEFT(CAST(CAST(fdate as BigInt) as varchar(20)),8)+' '+
SUBSTRING(CAST(CAST(fdate as BigInt) as varchar(20)),9,2)+':'+
SUBSTRING(CAST(CAST(fdate as BigInt) as varchar(20)),11,2)+':'+
SUBSTRING(CAST(CAST(fdate as BigInt) as varchar(20)),13,2) + '.' +
SUBSTRING(CAST(CAST(fdate as BigInt) as varchar(20)),15,3)
FROM #T
DROP TABLE #T -
Filter XML Data for Text Fields.
Hi,
I'm trying to display a single record out of an XML database
into dynamic fields in my MovieClip. I need to be able return a
single record based on the current time. Attached is a sample of my
XML data.
I was wondering if this could be acheived with a DataSet
filterFunction? If it is possible, what code would I need to
include?
Finally, do I need to pass my full DataSet to an array or do
I need to filter first & then pass to an array?
Thankyou.
Elton Bernardson.There's a pattern that almost every wpf dveloper uses and it's called mvvm.
Google it, there'll be a shed load of articles.
It's a passive view pattern in that the view has minimal logic in it.
The view is your window ( or usercontrol).
You can add a listboxitem to the listbox.items collection but i would only do that if it's a very simple static collection.
You can bind a collection to itemssource and the listbox will create a listboxitem for each things it gets from that collection.
It creates them using a datatemplate.
When you do that binding apparently directly to a collection a collectionvie is automagically created between control and collection.
You can explicitly create one of those collectionview things yourself and this is agreat way to filter and sort.
You can also use one of those collectionviews to navigate the collection setting the current item in the viewmodel.
That can be synced in the view so you select an item from the viewmodel.
I think I probably drifted off topic there somewhat.
Mvvm is probably different from stuff you've done before.
It's easier to do a bunch of things using mvvm plus it's what any prospective employer will want.
Along with tdd/bdd it's industry standard.
Big tip: learn it.
You want to avoid showing a user a huge load of data. Not so much for performance reasons but because users can only cope with so much data at a time.
Hope that helps.
Recent Technet articles: Property List Editing;
Dynamic XAML -
Split imported XML data into multiple text fields
I should first describe my final project because it is very possible that I am going about this entirely wrong!
I am trying to create an interactive PDF file which is the floor plan of our office, when you mouse over the office spaces it would popup the info for the person in that office, in fact when you click on the office space it would show additional info like computer MAC and jack numbers
I placed the floor plan as a layer and them created a second layer with no fill/no stroke rectangles over the offices and made them buttons (office01, office02)
I then made text fields with the info for the people, one for regular info and one for extra info (office01-data, office01-Xdata) I made these text fields buttons as well and had them "hidden until triggered"
These info fields are all on top of one another, as in the are all the same size and in teh same location
Then I went to the office buttons and created events "On Roll Over" "Show/Hide Buttons and Forms" and changed the visibility of the corresponding info button.
This works like a charm!
I hope I am clear up to this point.... my problem now is I would like to import this data both regular and extra from an excel spreadsheet or an XML file.
That way when we get new staff or people move offices or whatever I can update the spreadsheet or XML file, rerun my InDesign file and create a new interactive PDF
I have created the XML file
<staffMap>
<staff>
<name>John Doe</name>
<computerName<gfth56df</computerName>
<phoneMAC>00:08:00:AB:CD:EF</phoneMAC>
</staff>
<staff>
<name>John Smith</name>
<computerName<gfth06cb</computerName>
<phoneMAC>00:08:00:11:22:33</phoneMAC>
</staff>
</staffMap>
Created a new InDesign document
Imported the XML and placed it in a text field
saved as a template and closed it
Reopen and import the XML data again... and it brings it all into the text field... wonderful and useful but not what I need.
Is it possible to import the XML data into separate test fields, or into some other separate field that I can make into a button and show/hide?
I may end up just entering all the data directly into InDesign as I know this will work, it just does not seem like the right way to do it.
Thanking you all in advanceI am still looking to get some help with this.
I would love to know if it is not possible or any ideas at all
Maybe you are looking for
-
My desktop doesn't seem to recognize that I already have a sync account, so I tried to set up a new one. When I put in my email address, it was rejected as already in use. How do I get past this roadblock?
-
Database migration to MAXDB and Performance problem during R3load import
Hi All Experts, We want to migrate our SAP landscape from oracle to MAXDB(SAPDB). we have exported database of size 1.2 TB by using package and table level splitting method in 16 hrs. Now I am importing into MAXDB. But the import is running very slow
-
I get an error #1034 message in muse
everytime I open it. It reads..... TypeError:#1034: Type Coercionfailed:cannot convert com.adobe.muse.site.links::LinkProxy@4c30c11 to com.adobe.pageitem.common.model.IBounds. and thats verbatim
-
Testing the sender AS2 and Split997 adapters in sap xi
Hi, We configured a sender Split997 adapter communication channel in sap xi. Now we want to test if the communication is working fine in converting the EDIfact message to XML. How can we test this. Thanks in advance.
-
Hi can anyone help with this problem. I reinstalled Mac OS X 3.7 onto my mini Mac as my password locked me out. I couldn't help but notice that the "D" key was not working on my keyboard which coursed the password to not be recognised. Once I had Mac