Splititng an XML node into multiple fields

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Splititng an XML node into multiple fields

Chris Fitzpatrick
Hi everyone,

I'm making a form in Form Runner that has an XML node with  
geographical coordinate data that the users would like to have split  
into multiple fields.

It looks like this:

<mods:coordinates>W1730000 W0100000 N840000 N080000</mods:coordinates>

However, the users would like to have 4 separate fields to capture  
this data, but have all the data stored in this one XML node.

I've been trying to use the tokenize method to do this, but I can't  
seem to get the functionality to work properly.
I've also tried having a separate instance that binds to this node,  
but I can't seem to get a bind for this new instance that will pull  
the values from the fr-form-instance by default.

Does anyone have an suggestions as to how to get this functionality?

Any help would be greatly appreciated!

Thanks,chris.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Splititng an XML node into multiple fields

bsteuhl
Make all four fields required and make each successive input readonly until the user enters the previous block of data.  On the last block of data on DOMFocusOut use xforms:setvalue and concat all four fields with the spaces into your one element.  Then lock all the fields (Readonly).  If the user made a mistake then have a button to unlock the first field and remove all data from all the fields and they have to start over.  One of the disadvantages of breaking up into four fields more logic has to go into the design so the final value is as expected.  Or you could make a button readonly until all four fields are not empty and meet a specific constraint and when user clicks the button you create your one element.  I did that for criminal complaint Fingerprint Codes which was 10 different blocks (one for each finger) of data each with constraints and could not be empty string - button appears when no errors and allows users to create the 'One' element.  If they induce an error after creating the element, I remove the element and make the button readonly again until the error is corrected.

Hope this helps.  Just my quick thoughts as I do some work and watch the weather channel at almost midnight.  Should give you something to think about.
 

Brian Steuhl
Website: http://BTMSoftwareSolutions.com

Website: http://BTMDeals.com
Business Email: [hidden email]
Cell: 908-421-0742

Home Office: 732-961-3187

Google Voice: 732-800-1286 (1BTM)

BTM Deals Alert Sign Up Form
RSS Feed To My Blog:

Business Process Modeling - BTMSoftwareSolutions.com




From: Chris Fitzpatrick <[hidden email]>
To: [hidden email]
Sent: Thu, February 3, 2011 11:32:10 PM
Subject: [ops-users] Splititng an XML node into multiple fields

Hi everyone,

I'm making a form in Form Runner that has an XML node with geographical coordinate data that the users would like to have split into multiple fields.

It looks like this:

<mods:coordinates>W1730000 W0100000 N840000 N080000</mods:coordinates>

However, the users would like to have 4 separate fields to capture this data, but have all the data stored in this one XML node.

I've been trying to use the tokenize method to do this, but I can't seem to get the functionality to work properly.
I've also tried having a separate instance that binds to this node, but I can't seem to get a bind for this new instance that will pull the values from the fr-form-instance by default.

Does anyone have an suggestions as to how to get this functionality?

Any help would be greatly appreciated!

Thanks,chris.




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws