-
Just to verify -- the rule is set on the field you wish to populate via this code? Can you paste your code again so we have the latest?
-
As i didn't get any reply, i am adding more details to this problem with screen shot....
This is how i am writing the expression:
xdUtil:Match(string(Zip), ..\Pattern)
where Zip is current field, and Pattern is field from where i am getting \d\d\d\d\d but intead of taking value, it consider \Pattern as string. THis is where ...
-
Dang you guys are good. :) Jimmy, I used your solution for the first line, solved like a charm.
Hillary, I made the change you suggested, and it gives me a blank first line again, but does not fire the rule. Maybe I simply need to apply the rule to something else...although I can't figure out what...since the ...
-
With a slight adjustment to your Expression Statement by removing the /my: at the beginning, it worked...so I thought.
What seems to be happening is that if my Name is in the "BrandManager" Field on the FIRST row of the repeating table, the Conditional Expression that's tied to the Radio Button for ...
-
For the duplicated first line issue, this line is the problem:
XPathNodeIterator children = parent.Select("/d:ApplicationAccess", this.NamespaceManager);
Please try changing it to
XPathNodeIterator children = parent.Select("d:ApplicationAccess", this.NamespaceManager);
(forward slash removed) or
XPathNodeIterator ...
-
The rule isn't firing because we are filling the values, then appending the node. You can switch the lines in the for each loop so that the line:
parent.AppendChild(newNode);
Comes before the line that starts with:
newNode.SelectSingleNode
This way the newNode has been attached to the main dom BEFORE the value is set.....and your rule ...
-
Yay, both options work. But the first line is simply blank, which I thought the child.DeleteSelf() would take care of..(odd), and the rule that is applied to the field being set to a value isn't firing. If you have some quick ideas, I'd be appreciative, but you've both done more than I could imagine. :) ...
-
Yup. One other option would be to leave the first line Hilary mentioned the way you already have it and change the second line to this:
newNode.SelectSingleNode("@Applications", this.NamespaceManager).SetValue(auxDomNode.Value);
-
I think you want something more like:
not(my:BrandManager = /my:myFields/my:Misc/my:Current_User)
or perhaps
not(../my:BrandManager = /my:myFields/my:Misc/my:Current_User)
If you want to actually hide the radio button as opposed to disabling it, you can place it inside a small Section control bound to the same node as the radio button or ...
-
Jimmy was right -- it is the xpath you are using. The variable auxDomNode is already at ns1:Application. So instead of:
XPathNodeIterator auxDomNodes = ...