Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / July 2008

Tip: Looking for answers? Try searching our database.

Phase Start date starts after end of last phase. Repeating Rows Lo

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeremy - 22 Jul 2008 18:46 GMT
How do I make this work, just need repeating table/rows. I can do this
correctly other then setting the first start date. How do I specify to use
the End Date of the Previous row not the current row?

I hope this helps explain:

What I need

Project Start Date: 01/01/08
   
Repeating Table
PHASE    WKS    Delay    Phase Start Date    Phase End Date
01    1    0    01/01/08                   01/07/08
02    2    0    01/07/08                   01/21/08
03    1    0    01/21/08                   01/28/08

"Phase Start Date" = "addDAY(Project Start Date, (Delay*7))"
"Phase End Date" = "addDAY(Phase Start Date, (Phase WKS*7))" [*7 because I
need weeks not days]

My problem starts here, the first row works great but the second row's Phase
Start doesn't start from Phase End Date but from Project Start Date.

If I change Phase Start Date: to ="addDAY(Phase End Date, (Phase WKS*7))  -
This starts looping and fails out as expected.

How do I use one expression for the first row to give a start date but
change the expression for the second row to Phase Start date = End of
previous phase.


What I get now

Project Start Date: 01/01/08
PHASE    WKS    Delay    Phase Start Date    Phase End Date
01    1    0    01/01/08                   01/07/08
02    2    0    01/01/08                   01/14/08
03    1    0    01/01/08                   01/07/08


I changed row 2(phase 2)
Hilary Stoupa - 23 Jul 2008 03:45 GMT
Look into XPath's preceding-sibling -- this post might help:
http://kjellsj.blogspot.com/2005/04/using-xpath-preceding-sibling-in.html

I think you need to be setting the phase start date field to the
preceding-sibling of that row's phase end date ... and you probably need to
set a condition on that -- you don't want that on the first row.

Signature

Hilary Stoupa
Visit InfoPathDev at http://www.infopathdev.com

> How do I make this work, just need repeating table/rows. I can do this
> correctly other then setting the first start date. How do I specify to use
[quoted text clipped - 37 lines]
>
> I changed row 2(phase 2)
Jeremy - 23 Jul 2008 17:20 GMT
I think thats where I'm stuck, how do you have the 1st row have one string
but the second row or a repeating table have a different string?

and what would you call that so I can get more info?

> Look into XPath's preceding-sibling -- this post might help:
> http://kjellsj.blogspot.com/2005/04/using-xpath-preceding-sibling-in.html
[quoted text clipped - 44 lines]
> >
> > I changed row 2(phase 2)
Hilary Stoupa - 23 Jul 2008 17:25 GMT
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,
you could have the condition that count(GroupforTable) is equal to one, and
set the current start date field to the project start date. For your next
rule, if count(GroupforTable) > 1, set the current start date field to the
preceding sibling of it's end date... Does that make sense?
Signature

Hilary Stoupa
Visit InfoPathDev at http://www.infopathdev.com

> I think thats where I'm stuck, how do you have the 1st row have one string
> but the second row or a repeating table have a different string?
[quoted text clipped - 49 lines]
> > >
> > > I changed row 2(phase 2)
Jeremy - 23 Jul 2008 17:42 GMT
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)
Hilary Stoupa - 24 Jul 2008 16:01 GMT
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)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.