transcoding from a secondary source.

O

olivier

I have a recursive repeating section and would like to help the user to
select data from a list in a secondary XML source, let's say a function
name. Of course, this list is always the same. I could use the filter
solution but my problem is that I don't want to store in the resulting XML
the function name but the function code, linked to it in the secondary data
source (the user isn't supposed to know the function code, only the name).
So I have to translate function name to function code. Of course, I could
define a function name close to the function code in my recursive section
but in this case, it's going to be stored in the XML file, and I don't want
it as the code is enough. I thought to have a "working" drop list showing
the function name and a javascript doing the conversion but it doesn't seems
possible to have such a working field, furthermore in a repeating recursive
section. ANother way would be to call a javascript to clean the non required
node but I'm not sure I can detect the closing of the form and it's doesn't
appear to be a nice way.
Is that clear ? Any idea ? Thanks.
 
M

Michelle Beall

I'm not sure I'm understanding exactly what you are asking for, but you can
bind to a drop down list a display text and a value. When the user selects
an option the value is what will be stored in the XML. So if you have a
secondary data source that has

code text
---- --------
1111 option 1
2222 option 2

Then you can bind your drop down list to display the text for each option
but store the value of the option in the xml.
This can be done without code through the drop down list control properties
window. Just bind the drop down list to a secondary data source and set the
repeating node where you will get the data, then set the value and the text
source accordingly.

Hope that helps.
Michelle
 
O

olivier

Yes, you're right, thanks. I didn't find it because there is a mistake in the
secondary source file which is coded :

<Function code="F1">
<Name>function_name</Name>
....
so the Infopath display name field shows only "Name" in the tree and not Code

I think I'll have to correct that in this way :
<Function>
<Code>F1</Code>
<Name>function_name</Name>

Thanks a lot.
 

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