Create new form from existing datasource

A

Andreas Ek

I'm creating a new InfoPath form based upon an already exisiting
XML-source.
Is there any chance to set the fields data type in the XML-file before
creating the InfoPath form instead of having to change them
afterwards?

My XML file example is like this:

<object>
<myField1>Andreas</myField1>
<myField2>5</myField2>
<myField3>2005-01-01</myField3>
</object>

To get the InfoPath to give the fields right assigments directly,
perhaps there is a way to do that. Just guessing now:

<object>
<myField1 type="string">Andreas</myField1>
<myField2 type="integer">5</myField2>
<myField3 type="date">TEST</myField3>
</object>

I have a lot of fields and this would help a lot!

But is it possible???
 
R

Renee in Juneau

Well, I haven't had any desire to but yes, I think you *could* but it
would be so much work and Infopath makes it so straightforward, why
bother? :)

You'd need to create an XML schema (XSD file) and then design a new
form using the XSD as your source.

http://www.w3.org/TR/2004/PER-xmlschema-1-20040318/

Thing is, you *still* have to drag the fields on to your view and
arrange them the way you want them.

If you just use your existing source in Infopath and drag the fields
over, they'll default to text fields, which is mostly what you want
anyway....so you have to go in to the properties and modify the
validation you want on them. Big deal. Its SOOOOO much less of a
hassle than creating a schema by hand.

Good Luck, though.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top