Lets see if I can repeat it back. On repeating section? or table?
Create rule that says if count table row = 1 use default start date.(row1)
Create rule that says if count table row =>1 use preceding sibling. (row>1)
For this I think is my problem
I've been trying to use:
current()/../preceding-sibling::my:row[1]/my:field1 -
however 'my:row' doesn't work with any xpath I put in. If I use add field
and add the repeating group or repeating section I get /../ for my:row which
errors as not pointing to anything. I do the same for my:field1 but put the
End_Date field in. I get /../End_Date
I'm missing something here, I've yet to find any help on xpath's or finding
what a fields is anywhere. I spent 4 hours yesterday looking for examples of
xpath formatting. Nothing.
Forum entry said this was the syntex "my:row" is the repeating group and
"my:field1" one of the fields in a
repeating row. Note: The expression looks like this when the "Edit XPath
(advanced) checkbox is checked. " Found at link below
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?&query=curren
t()+preceding-sibling&lang=en&cr=US&guid=&sloc=en-us&dg=microsoft.public.infopat
h&p=1&tid=6a4f0658-6dae-4b7d-93a5-ed6cbe5e5e38&mid=c6af5ac7-291c-4cbf-aab1-b12f8
33d4f4e
But if I put the repeating group in for my:row I get /../ which errrors.
> Well, let's see. You could use rules to set the values on the fields -- I
> would think maybe attach the rules to the table itself. For your first rule,
[quoted text clipped - 56 lines]
> > > >
> > > > I changed row 2(phase 2)
Well, I put together a little demo, and I actually took a different approach
than the one I initially suggested to you. I put a rule on the main start
date to fill the first repeating table row start date field if there was
exactly one row in the table. Then I set the default value on the repeating
date to be the preceding sibling of the end date field. If you have an email
address you don't mind exposing (set up a junk account somewhere... ) I'd be
happy to send you the sample form. If not, here is the syntax, but keep in
mind that since your fields/data structure will be different, so will your
syntax.
On the main start date (Project Start):
Set a rule
Condition: The expression count(preceding-sibling::my:group1/my:group2) = 1
Action: Set a field's value, select the start date in your repeating group,
for the value, select your main start date
On the start date in your repeating section:
Set a default value
In the formula editor: ../preceding-sibling::my:group2[1]/my:field2
Again, I'm happy to send you the sample if it would help....

Signature
Hilary Stoupa
Visit InfoPathDev at http://www.infopathdev.com
> Lets see if I can repeat it back. On repeating section? or table?
> Create rule that says if count table row = 1 use default start date.(row1)
[quoted text clipped - 83 lines]
> > > > >
> > > > > I changed row 2(phase 2)
Jeremy - 24 Jul 2008 17:16 GMT
You Rock! my email is cyberaxe@hotmail.com
This account is 15 years old and everywhere so spam doesn't matter it's set
to exclusive on the spam filter anyways. lol
With 95% spam and 5% good I'd say exclusive is right.
I tried this but used 'if field is blank' but that didn't work, this looks
much better.
in xpath do views have any affect on the path. I have 32 pages in this form,
I wouldn't mind showing people it but we use sharepoint and many fields are
used from our internal network.
Maybe I'll clean those up for a demo.
If you could send me the example you setup that would be great.
> Well, I put together a little demo, and I actually took a different approach
> than the one I initially suggested to you. I put a rule on the main start
[quoted text clipped - 105 lines]
> > > > > >
> > > > > > I changed row 2(phase 2)
Jeremy - 24 Jul 2008 17:22 GMT
Is there a website somewhere with examples of these types of setups? I was
think how much easier all this would be if there were infopath example forms
other then Microsoft's that could show advanced setups. I think that would be
better then the form try this...
Thanks for the help, I'll think about creating a website or mesh to host
example form from here.
> Well, I put together a little demo, and I actually took a different approach
> than the one I initially suggested to you. I put a rule on the main start
[quoted text clipped - 105 lines]
> > > > > >
> > > > > > I changed row 2(phase 2)