It sounds more like what you are trying to accomplish is create a set of cascading drop-down lists... If that is the case, have you looked at the InfoPath Dev: Nugget titled, "Creating Non-Repeating Cascading Drop-Down List Boxes", and the InfoPath Dev: Example titled, "Repeating Cascading Lists of Cascading Lists"?
--
Greg Collins [InfoPath MVP]
Please visit:
http://www.InfoPathDev.com
My problem is that Infopath allows recursive structure but when you bind
those structure to a secondary datasource, the binding is hard coded and
doesn't follow the level of recursivity. In other words, my form helps to
describe what functions are in a system, and a function is composed of
functions. So a list of available function is given by the secondary data
source
<function>
<name>zoom
<function>
<name>in
<name>out
So I would like that the first inserted structure shows a drop list with
"zoom" and the same drop-list in the inserted function shows "in, out". But
Infopath doesn't do that in the properties/entry box, and is stuck on the
first level. My idea was then to modify the view1.xsl in order to catch the
current node when entering ins the function template (current and parent
node) and modify the xpath string to convert it from absolute to relative and
shows "childs of current node whose name is <zoom>".
But unfortunately, as you say, it's not possible to catch the current node
in an xsl variable and when the xsl is in the secondary source filtering to
generate the second level drop list, the current node is lost. (I hope I'm
clear)
There is an example in the infopath sdf/best practices to make structures
recursive but the example doesn't seems to me up to date, is it ?
I don't understand the "on context change" capacities.
Greg Collins said:
InfoPath does not play well with custom user variables (i.e. xsl:variables that weren't placed there by InfoPath).
Why not look into using the OnContextChange event instead?
--
Greg Collins [InfoPath MVP]
Please visit:
http://www.InfoPathDev.com
Hi,
I tried to modify the view1.xsl in order to memorize the current node. The
syntax is
<xsl:variable name="f" select="current()" />
The problem is that when I add this, I get "Infopath has encountered an
error. The operation failed.
Any idea to explain why Infopath doesn't accept what seems to me a correct
xsl syntax ?