I'm trying to create a Default Value for a textbox that is in a repeating table. Since you can't set up an if-then-else structure for Default Value, I did some research and found this article, which in Method 2 references a nasty concat(substring()) thing that I think might do what I need. Thing is, the condition I need to evaluate as true or false is the row number of my textbox, and I'm having some trouble building the correct syntax. The function help says that the syntax for position is position(field) and everywhere else in Default Value I can use "." (without quotes) to denote the current field, yet when I put (position(.) < 9) for the true condition on my first substring, it says that position(.) contains an invalid number of arguments. Hunhhh??? I also tried (.[position() < 9) and got a different error, but I think that the []s indicate filter syntax, which is not what I need here.
Better yet, when I try to Google examples of position() syntax, I don't find much.
Do any of you who know IP and XPath better than this poor clueless newbie know the correct syntax for what I'm trying to do? If it helps any, the overall string I'm trying to build is concat(substring("Incident", 1, (position(.) < 9) * string-length("Incident")), substring("Change", 1, (position(.) > 8 and position(.) < 12) *string-length("Change")), substring("Problem", 1, (position(.) = 12) * string-length("Problem")), substring("Any", 1, (position(.) = 13) * string-length("Any")))
Thanks,
nkstrou
An imprecisely defined requirement has an infinite number of possible solutions. Unfortunately, only about a maxiumum of 3 solutions are actually satisfactory to the end user.