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

J

Jeremy

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)
 
J

Jeremy

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?



Hilary Stoupa said:
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.

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



Jeremy said:
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)
 
H

Hilary Stoupa

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?
--
Hilary Stoupa
Visit InfoPathDev at http://www.infopathdev.com



Jeremy said:
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?



Hilary Stoupa said:
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.

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



Jeremy said:
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)
 
J

Jeremy

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/communitie...5e38&mid=c6af5ac7-291c-4cbf-aab1-b12f833d4f4e

But if I put the repeating group in for my:row I get /../ which errrors.




Hilary Stoupa said:
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?
--
Hilary Stoupa
Visit InfoPathDev at http://www.infopathdev.com



Jeremy said:
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?



Hilary Stoupa said:
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.

--
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
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)
 
H

Hilary Stoupa

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....

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



Jeremy said:
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/communitie...5e38&mid=c6af5ac7-291c-4cbf-aab1-b12f833d4f4e

But if I put the repeating group in for my:row I get /../ which errrors.




Hilary Stoupa said:
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?
--
Hilary Stoupa
Visit InfoPathDev at http://www.infopathdev.com



Jeremy said:
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

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.

--
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
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)
 
J

Jeremy

You Rock! my email is (e-mail address removed)
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.




Hilary Stoupa said:
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....

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



Jeremy said:
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/communitie...5e38&mid=c6af5ac7-291c-4cbf-aab1-b12f833d4f4e

But if I put the repeating group in for my:row I get /../ which errrors.




Hilary Stoupa said:
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?
--
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?

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

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.

--
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
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)
 
J

Jeremy

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.


Hilary Stoupa said:
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....

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



Jeremy said:
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/communitie...5e38&mid=c6af5ac7-291c-4cbf-aab1-b12f833d4f4e

But if I put the repeating group in for my:row I get /../ which errrors.




Hilary Stoupa said:
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?
--
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?

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

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.

--
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
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top