Datasource filtering syntax?

B

Barry Prentiss

Hi,
I have an InfoPath '03 form library datasource that returns all values for
ProjNum and SubProjNum from the forms submitted there.
I am now filtering this datasource to identify the max value of the
SubProjNums for a specific ProjNum (in order to increment by 1 for the next
sub proj form).
My assignment looks like this:
NewSubProjNum = max(@SubProjNum[@ProjNum = ProjNum]) + 1

ProjNum is a value in a field on the new form and displays fine.
max(@ProjNum) returns the max(ProjNum) from the datasource fine.
But filtering the datasource for the max SubProjNum where @ProjNum =
ProjNum returns NaN.

Can anyone see what I am doing wrong here?
Any suggestions?
Thx,
Barry
 
S

Swathi (GGK Tech)

Hi,
Is the @ProjNum child of @SubProjNum in secondary data source? Once verify
that. Also after selecting @SubProjNum, click on Filter data. There select
the @ProjNum in the first drop down, is equal to in the second drop down and
ProjNum (main data source) in the third drop down. Click ok until all the
windows gets closed.
 
B

Barry Prentiss

Thx Swathi,
Yes, @ProjNum and @SubProjNum are both fields returned by the form library
datasource.
There is one @ProjNum and one @SubProjNum for each record (no parent-child
relationship).
Max(@SubProjNum[@ProjNum = ProjNum]) returns NaN.
Any more ideas?
Thx,
Barry


Swathi (GGK Tech) said:
Hi,
Is the @ProjNum child of @SubProjNum in secondary data source? Once verify
that. Also after selecting @SubProjNum, click on Filter data. There select
the @ProjNum in the first drop down, is equal to in the second drop down
and
ProjNum (main data source) in the third drop down. Click ok until all the
windows gets closed.


--
Swathi Porandla
http://www.ggktech.com



Barry Prentiss said:
Hi,
I have an InfoPath '03 form library datasource that returns all values
for
ProjNum and SubProjNum from the forms submitted there.
I am now filtering this datasource to identify the max value of the
SubProjNums for a specific ProjNum (in order to increment by 1 for the
next
sub proj form).
My assignment looks like this:
NewSubProjNum = max(@SubProjNum[@ProjNum = ProjNum]) + 1

ProjNum is a value in a field on the new form and displays fine.
max(@ProjNum) returns the max(ProjNum) from the datasource fine.
But filtering the datasource for the max SubProjNum where @ProjNum =
ProjNum returns NaN.

Can anyone see what I am doing wrong here?
Any suggestions?
Thx,
Barry
 
B

Barry Prentiss

Turns out I had to call the number function for the form-side ProjNum
value:
Max(@SubProjNum[@ProjNum = number(ProjNum)])
Hope this saves someone a few hours of anxiety...
Thx,
Barry

Barry Prentiss said:
Thx Swathi,
Yes, @ProjNum and @SubProjNum are both fields returned by the form library
datasource.
There is one @ProjNum and one @SubProjNum for each record (no parent-child
relationship).
Max(@SubProjNum[@ProjNum = ProjNum]) returns NaN.
Any more ideas?
Thx,
Barry


Swathi (GGK Tech) said:
Hi,
Is the @ProjNum child of @SubProjNum in secondary data source? Once
verify
that. Also after selecting @SubProjNum, click on Filter data. There
select
the @ProjNum in the first drop down, is equal to in the second drop down
and
ProjNum (main data source) in the third drop down. Click ok until all
the
windows gets closed.


--
Swathi Porandla
http://www.ggktech.com



Barry Prentiss said:
Hi,
I have an InfoPath '03 form library datasource that returns all values
for
ProjNum and SubProjNum from the forms submitted there.
I am now filtering this datasource to identify the max value of the
SubProjNums for a specific ProjNum (in order to increment by 1 for the
next
sub proj form).
My assignment looks like this:
NewSubProjNum = max(@SubProjNum[@ProjNum = ProjNum]) + 1

ProjNum is a value in a field on the new form and displays fine.
max(@ProjNum) returns the max(ProjNum) from the datasource fine.
But filtering the datasource for the max SubProjNum where @ProjNum =
ProjNum returns NaN.

Can anyone see what I am doing wrong here?
Any suggestions?
Thx,
Barry
 
S

Shiva (GGK Tech)

Hello,

You have to check once your filter condition should be change.
NewSubProjNum = max(@SubProjNum[@ProjNum = ProjNum]) + 1
In this you have to specify the ‘@ProjNum’ and ‘ProjNum’ field’s are
getting? You have to give full path of the main DOM here.

--
Shiva
http://www.ggktech.com


Barry Prentiss said:
Thx Swathi,
Yes, @ProjNum and @SubProjNum are both fields returned by the form library
datasource.
There is one @ProjNum and one @SubProjNum for each record (no parent-child
relationship).
Max(@SubProjNum[@ProjNum = ProjNum]) returns NaN.
Any more ideas?
Thx,
Barry


Swathi (GGK Tech) said:
Hi,
Is the @ProjNum child of @SubProjNum in secondary data source? Once verify
that. Also after selecting @SubProjNum, click on Filter data. There select
the @ProjNum in the first drop down, is equal to in the second drop down
and
ProjNum (main data source) in the third drop down. Click ok until all the
windows gets closed.


--
Swathi Porandla
http://www.ggktech.com



Barry Prentiss said:
Hi,
I have an InfoPath '03 form library datasource that returns all values
for
ProjNum and SubProjNum from the forms submitted there.
I am now filtering this datasource to identify the max value of the
SubProjNums for a specific ProjNum (in order to increment by 1 for the
next
sub proj form).
My assignment looks like this:
NewSubProjNum = max(@SubProjNum[@ProjNum = ProjNum]) + 1

ProjNum is a value in a field on the new form and displays fine.
max(@ProjNum) returns the max(ProjNum) from the datasource fine.
But filtering the datasource for the max SubProjNum where @ProjNum =
ProjNum returns NaN.

Can anyone see what I am doing wrong here?
Any suggestions?
Thx,
Barry
 

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