PDA

View Full Version : Lookup Constraint



Bob Worsley
15-Jul-2007, 09:07 AM
I need to constrain a lookup list and find in my WO. I see how the example
did it, but I haven't been able to duplicate it. The one difference is that
I've added a global variable to PageTop.Inc.asp that holds what I want to
constrain to - a company ID so I have my value at login. I can see the
value of this variable is correct in my program before the lookup is
activated. I put the value into a hidden field named "user_companyid" and
called it in OnAjaxRequestSetStart & GeTAjaxRequestUserData but cannot
retrieve the value.

1) Is my concept sound?

2) How do I view the user data that's being passed? Eddie showed us in the
class at Synergy but I apparently missed exactly how to view it. I'm using
FireBug but haven't found where it would display.

Bob

Edwin van der Velden
16-Jul-2007, 03:04 AM
1) From what I understand of it it does sound like it should be workable.

2) In firebug open the console, expand the POST line that was just sent on
lookup action and look at the Post tab, here you should find near the
bottom:
<aUserData></aUserData>Which contains any user data if there was any
sent.qlternatively, you can debug and put a breakpoint in on of the vdf
functions and see what the struct contains there.-Edwin

"Bob Worsley" <bworsley@comcast.net> wrote in message
news:SY4cAluxHHA.2024@dacmail.dataaccess.com...
>I need to constrain a lookup list and find in my WO. I see how the example
> did it, but I haven't been able to duplicate it. The one difference is
> that
> I've added a global variable to PageTop.Inc.asp that holds what I want to
> constrain to - a company ID so I have my value at login. I can see the
> value of this variable is correct in my program before the lookup is
> activated. I put the value into a hidden field named "user_companyid" and
> called it in OnAjaxRequestSetStart & GeTAjaxRequestUserData but cannot
> retrieve the value.
>
> 1) Is my concept sound?
>
> 2) How do I view the user data that's being passed? Eddie showed us in
> the
> class at Synergy but I apparently missed exactly how to view it. I'm
> using
> FireBug but haven't found where it would display.
>
> Bob
>
>
>

Bob Worsley
16-Jul-2007, 07:07 AM
Hmmmm.... the <aUserData></aUserData> tags are in all cases for this empty.
I'm checking this when click the lookup button and get the lookup dialog. I
was hoping to see what was passed back but maybe I'm looking in the wrong
place.

As to my hidden field, can I populate it like this:

<input type="hidden" name="user_companyid"
value="<%=iCompanyID%>" />

the iCompanyID variable is populated correctly. But in the WO,

Get GeTAjaxRequestUserData "user_companyid" to iCompanyId

Always returns 0. I can't help but think I've got a simple syntax or timing
error somewhere.
Bob

"Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in message
news:HgTkp$3xHHA.5736@dacmail.dataaccess.com...
> 1) From what I understand of it it does sound like it should be workable.
>
> 2) In firebug open the console, expand the POST line that was just sent on
> lookup action and look at the Post tab, here you should find near the
> bottom:
> <aUserData></aUserData>Which contains any user data if there was any
> sent.qlternatively, you can debug and put a breakpoint in on of the vdf
> functions and see what the struct contains there.-Edwin
>
> "Bob Worsley" <bworsley@comcast.net> wrote in message
> news:SY4cAluxHHA.2024@dacmail.dataaccess.com...
> >I need to constrain a lookup list and find in my WO. I see how the
example
> > did it, but I haven't been able to duplicate it. The one difference is
> > that
> > I've added a global variable to PageTop.Inc.asp that holds what I want
to
> > constrain to - a company ID so I have my value at login. I can see the
> > value of this variable is correct in my program before the lookup is
> > activated. I put the value into a hidden field named "user_companyid"
and
> > called it in OnAjaxRequestSetStart & GeTAjaxRequestUserData but cannot
> > retrieve the value.
> >
> > 1) Is my concept sound?
> >
> > 2) How do I view the user data that's being passed? Eddie showed us in
> > the
> > class at Synergy but I apparently missed exactly how to view it. I'm
> > using
> > FireBug but haven't found where it would display.
> >
> > Bob
> >
> >
> >
>
>
>

Edwin van der Velden
16-Jul-2007, 07:31 AM
If I understood it correctly the companyid once set won't change, in that
case it is the right way to populate your hidden field. A simple test can be
done by changing the type to text so you can see the field and it's value
(ok while typing this I read you already set it was populated correctly so
prolly a nvm on this remark ;-)).

Another thing though, I've tried it a bit myself but it may actually be the
case then the lookup code does not send the user data. If you want to try,
just repeat the same process to lookup your data post as described for the
lookup only in this case do it for a find. You may notice that now it does
have userdata in the request.

If even a find does not send the user data along then you may want to check
if your field is inside to form, but for now I'll assume that you will find
userdata in a find request but not in a lookup request.

-Edwin


"Bob Worsley" <bworsley@comcast.net> wrote in message
news:4FWmtG6xHHA.1992@dacmail.dataaccess.com...
> Hmmmm.... the <aUserData></aUserData> tags are in all cases for this
> empty.
> I'm checking this when click the lookup button and get the lookup dialog.
> I
> was hoping to see what was passed back but maybe I'm looking in the wrong
> place.
>
> As to my hidden field, can I populate it like this:
>
> <input type="hidden" name="user_companyid"
> value="<%=iCompanyID%>" />
>
> the iCompanyID variable is populated correctly. But in the WO,
>
> Get GeTAjaxRequestUserData "user_companyid" to iCompanyId
>
> Always returns 0. I can't help but think I've got a simple syntax or
> timing
> error somewhere.
> Bob
>
> "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> message
> news:HgTkp$3xHHA.5736@dacmail.dataaccess.com...
>> 1) From what I understand of it it does sound like it should be workable.
>>
>> 2) In firebug open the console, expand the POST line that was just sent
>> on
>> lookup action and look at the Post tab, here you should find near the
>> bottom:
>> <aUserData></aUserData>Which contains any user data if there was any
>> sent.qlternatively, you can debug and put a breakpoint in on of the vdf
>> functions and see what the struct contains there.-Edwin
>>
>> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> news:SY4cAluxHHA.2024@dacmail.dataaccess.com...
>> >I need to constrain a lookup list and find in my WO. I see how the
> example
>> > did it, but I haven't been able to duplicate it. The one difference is
>> > that
>> > I've added a global variable to PageTop.Inc.asp that holds what I want
> to
>> > constrain to - a company ID so I have my value at login. I can see the
>> > value of this variable is correct in my program before the lookup is
>> > activated. I put the value into a hidden field named "user_companyid"
> and
>> > called it in OnAjaxRequestSetStart & GeTAjaxRequestUserData but cannot
>> > retrieve the value.
>> >
>> > 1) Is my concept sound?
>> >
>> > 2) How do I view the user data that's being passed? Eddie showed us in
>> > the
>> > class at Synergy but I apparently missed exactly how to view it. I'm
>> > using
>> > FireBug but haven't found where it would display.
>> >
>> > Bob
>> >
>> >
>> >
>>
>>
>>
>
>
>

Bob Worsley
16-Jul-2007, 07:59 AM
You are correct, it's there in the find:

<m:TAjaxUserData>
<m:sName>user_companyid</m:sName>
<m:sValue>1</m:sValue>
</m:TAjaxUserData>

but not for the lookup. Then is there another way to do this? I tried
using the vdfRemoteMethod functionality and it works sometimes, but isn't
reliable.
Bob

"Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in message
news:63KD9U6xHHA.1940@dacmail.dataaccess.com...
> If I understood it correctly the companyid once set won't change, in that
> case it is the right way to populate your hidden field. A simple test can
be
> done by changing the type to text so you can see the field and it's value
> (ok while typing this I read you already set it was populated correctly so
> prolly a nvm on this remark ;-)).
>
> Another thing though, I've tried it a bit myself but it may actually be
the
> case then the lookup code does not send the user data. If you want to try,
> just repeat the same process to lookup your data post as described for the
> lookup only in this case do it for a find. You may notice that now it does
> have userdata in the request.
>
> If even a find does not send the user data along then you may want to
check
> if your field is inside to form, but for now I'll assume that you will
find
> userdata in a find request but not in a lookup request.
>
> -Edwin
>
>
> "Bob Worsley" <bworsley@comcast.net> wrote in message
> news:4FWmtG6xHHA.1992@dacmail.dataaccess.com...
> > Hmmmm.... the <aUserData></aUserData> tags are in all cases for this
> > empty.
> > I'm checking this when click the lookup button and get the lookup
dialog.
> > I
> > was hoping to see what was passed back but maybe I'm looking in the
wrong
> > place.
> >
> > As to my hidden field, can I populate it like this:
> >
> > <input type="hidden" name="user_companyid"
> > value="<%=iCompanyID%>" />
> >
> > the iCompanyID variable is populated correctly. But in the WO,
> >
> > Get GeTAjaxRequestUserData "user_companyid" to iCompanyId
> >
> > Always returns 0. I can't help but think I've got a simple syntax or
> > timing
> > error somewhere.
> > Bob
> >
> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> > message
> > news:HgTkp$3xHHA.5736@dacmail.dataaccess.com...
> >> 1) From what I understand of it it does sound like it should be
workable.
> >>
> >> 2) In firebug open the console, expand the POST line that was just sent
> >> on
> >> lookup action and look at the Post tab, here you should find near the
> >> bottom:
> >> <aUserData></aUserData>Which contains any user data if there was any
> >> sent.qlternatively, you can debug and put a breakpoint in on of the vdf
> >> functions and see what the struct contains there.-Edwin
> >>
> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
> >> news:SY4cAluxHHA.2024@dacmail.dataaccess.com...
> >> >I need to constrain a lookup list and find in my WO. I see how the
> > example
> >> > did it, but I haven't been able to duplicate it. The one difference
is
> >> > that
> >> > I've added a global variable to PageTop.Inc.asp that holds what I
want
> > to
> >> > constrain to - a company ID so I have my value at login. I can see
the
> >> > value of this variable is correct in my program before the lookup is
> >> > activated. I put the value into a hidden field named
"user_companyid"
> > and
> >> > called it in OnAjaxRequestSetStart & GeTAjaxRequestUserData but
cannot
> >> > retrieve the value.
> >> >
> >> > 1) Is my concept sound?
> >> >
> >> > 2) How do I view the user data that's being passed? Eddie showed us
in
> >> > the
> >> > class at Synergy but I apparently missed exactly how to view it. I'm
> >> > using
> >> > FireBug but haven't found where it would display.
> >> >
> >> > Bob
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >
> >
> >
>
>
>

Edwin van der Velden
16-Jul-2007, 08:18 AM
That depends on your data structure I guess. Is the user_companyid refering
to the id of a company in a seperate table so you can get it's row id and
instead of adding a custom userdata field you add a rowid field for the
company. Rowid fields should be sent along in a lookup request.

I have added it to our buglist.


-Edwin



"Bob Worsley" <bworsley@comcast.net> wrote in message
news:7qo2nj6xHHA.5536@dacmail.dataaccess.com...
> You are correct, it's there in the find:
>
> <m:TAjaxUserData>
> <m:sName>user_companyid</m:sName>
> <m:sValue>1</m:sValue>
> </m:TAjaxUserData>
>
> but not for the lookup. Then is there another way to do this? I tried
> using the vdfRemoteMethod functionality and it works sometimes, but isn't
> reliable.
> Bob
>
> "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> message
> news:63KD9U6xHHA.1940@dacmail.dataaccess.com...
>> If I understood it correctly the companyid once set won't change, in that
>> case it is the right way to populate your hidden field. A simple test can
> be
>> done by changing the type to text so you can see the field and it's value
>> (ok while typing this I read you already set it was populated correctly
>> so
>> prolly a nvm on this remark ;-)).
>>
>> Another thing though, I've tried it a bit myself but it may actually be
> the
>> case then the lookup code does not send the user data. If you want to
>> try,
>> just repeat the same process to lookup your data post as described for
>> the
>> lookup only in this case do it for a find. You may notice that now it
>> does
>> have userdata in the request.
>>
>> If even a find does not send the user data along then you may want to
> check
>> if your field is inside to form, but for now I'll assume that you will
> find
>> userdata in a find request but not in a lookup request.
>>
>> -Edwin
>>
>>
>> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> news:4FWmtG6xHHA.1992@dacmail.dataaccess.com...
>> > Hmmmm.... the <aUserData></aUserData> tags are in all cases for this
>> > empty.
>> > I'm checking this when click the lookup button and get the lookup
> dialog.
>> > I
>> > was hoping to see what was passed back but maybe I'm looking in the
> wrong
>> > place.
>> >
>> > As to my hidden field, can I populate it like this:
>> >
>> > <input type="hidden" name="user_companyid"
>> > value="<%=iCompanyID%>" />
>> >
>> > the iCompanyID variable is populated correctly. But in the WO,
>> >
>> > Get GeTAjaxRequestUserData "user_companyid" to iCompanyId
>> >
>> > Always returns 0. I can't help but think I've got a simple syntax or
>> > timing
>> > error somewhere.
>> > Bob
>> >
>> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
>> > message
>> > news:HgTkp$3xHHA.5736@dacmail.dataaccess.com...
>> >> 1) From what I understand of it it does sound like it should be
> workable.
>> >>
>> >> 2) In firebug open the console, expand the POST line that was just
>> >> sent
>> >> on
>> >> lookup action and look at the Post tab, here you should find near the
>> >> bottom:
>> >> <aUserData></aUserData>Which contains any user data if there was any
>> >> sent.qlternatively, you can debug and put a breakpoint in on of the
>> >> vdf
>> >> functions and see what the struct contains there.-Edwin
>> >>
>> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> >> news:SY4cAluxHHA.2024@dacmail.dataaccess.com...
>> >> >I need to constrain a lookup list and find in my WO. I see how the
>> > example
>> >> > did it, but I haven't been able to duplicate it. The one difference
> is
>> >> > that
>> >> > I've added a global variable to PageTop.Inc.asp that holds what I
> want
>> > to
>> >> > constrain to - a company ID so I have my value at login. I can see
> the
>> >> > value of this variable is correct in my program before the lookup is
>> >> > activated. I put the value into a hidden field named
> "user_companyid"
>> > and
>> >> > called it in OnAjaxRequestSetStart & GeTAjaxRequestUserData but
> cannot
>> >> > retrieve the value.
>> >> >
>> >> > 1) Is my concept sound?
>> >> >
>> >> > 2) How do I view the user data that's being passed? Eddie showed us
> in
>> >> > the
>> >> > class at Synergy but I apparently missed exactly how to view it.
>> >> > I'm
>> >> > using
>> >> > FireBug but haven't found where it would display.
>> >> >
>> >> > Bob
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >
>> >
>> >
>>
>>
>>
>
>
>

Bob Worsley
16-Jul-2007, 08:27 AM
The issue is one of timing. I think I need to grab the company ID when he
logs on so that I have it before he retrieves data in a later screen since
we're limiting that data to his company only. I'm not sure that rowid is
any better for this, is it?
Bob

"Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in message
news:s5eQOv6xHHA.1940@dacmail.dataaccess.com...
> That depends on your data structure I guess. Is the user_companyid
refering
> to the id of a company in a seperate table so you can get it's row id and
> instead of adding a custom userdata field you add a rowid field for the
> company. Rowid fields should be sent along in a lookup request.
>
> I have added it to our buglist.
>
>
> -Edwin
>
>
>
> "Bob Worsley" <bworsley@comcast.net> wrote in message
> news:7qo2nj6xHHA.5536@dacmail.dataaccess.com...
> > You are correct, it's there in the find:
> >
> > <m:TAjaxUserData>
> > <m:sName>user_companyid</m:sName>
> > <m:sValue>1</m:sValue>
> > </m:TAjaxUserData>
> >
> > but not for the lookup. Then is there another way to do this? I tried
> > using the vdfRemoteMethod functionality and it works sometimes, but
isn't
> > reliable.
> > Bob
> >
> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> > message
> > news:63KD9U6xHHA.1940@dacmail.dataaccess.com...
> >> If I understood it correctly the companyid once set won't change, in
that
> >> case it is the right way to populate your hidden field. A simple test
can
> > be
> >> done by changing the type to text so you can see the field and it's
value
> >> (ok while typing this I read you already set it was populated correctly
> >> so
> >> prolly a nvm on this remark ;-)).
> >>
> >> Another thing though, I've tried it a bit myself but it may actually be
> > the
> >> case then the lookup code does not send the user data. If you want to
> >> try,
> >> just repeat the same process to lookup your data post as described for
> >> the
> >> lookup only in this case do it for a find. You may notice that now it
> >> does
> >> have userdata in the request.
> >>
> >> If even a find does not send the user data along then you may want to
> > check
> >> if your field is inside to form, but for now I'll assume that you will
> > find
> >> userdata in a find request but not in a lookup request.
> >>
> >> -Edwin
> >>
> >>
> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
> >> news:4FWmtG6xHHA.1992@dacmail.dataaccess.com...
> >> > Hmmmm.... the <aUserData></aUserData> tags are in all cases for this
> >> > empty.
> >> > I'm checking this when click the lookup button and get the lookup
> > dialog.
> >> > I
> >> > was hoping to see what was passed back but maybe I'm looking in the
> > wrong
> >> > place.
> >> >
> >> > As to my hidden field, can I populate it like this:
> >> >
> >> > <input type="hidden" name="user_companyid"
> >> > value="<%=iCompanyID%>" />
> >> >
> >> > the iCompanyID variable is populated correctly. But in the WO,
> >> >
> >> > Get GeTAjaxRequestUserData "user_companyid" to iCompanyId
> >> >
> >> > Always returns 0. I can't help but think I've got a simple syntax or
> >> > timing
> >> > error somewhere.
> >> > Bob
> >> >
> >> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> >> > message
> >> > news:HgTkp$3xHHA.5736@dacmail.dataaccess.com...
> >> >> 1) From what I understand of it it does sound like it should be
> > workable.
> >> >>
> >> >> 2) In firebug open the console, expand the POST line that was just
> >> >> sent
> >> >> on
> >> >> lookup action and look at the Post tab, here you should find near
the
> >> >> bottom:
> >> >> <aUserData></aUserData>Which contains any user data if there was any
> >> >> sent.qlternatively, you can debug and put a breakpoint in on of the
> >> >> vdf
> >> >> functions and see what the struct contains there.-Edwin
> >> >>
> >> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
> >> >> news:SY4cAluxHHA.2024@dacmail.dataaccess.com...
> >> >> >I need to constrain a lookup list and find in my WO. I see how the
> >> > example
> >> >> > did it, but I haven't been able to duplicate it. The one
difference
> > is
> >> >> > that
> >> >> > I've added a global variable to PageTop.Inc.asp that holds what I
> > want
> >> > to
> >> >> > constrain to - a company ID so I have my value at login. I can
see
> > the
> >> >> > value of this variable is correct in my program before the lookup
is
> >> >> > activated. I put the value into a hidden field named
> > "user_companyid"
> >> > and
> >> >> > called it in OnAjaxRequestSetStart & GeTAjaxRequestUserData but
> > cannot
> >> >> > retrieve the value.
> >> >> >
> >> >> > 1) Is my concept sound?
> >> >> >
> >> >> > 2) How do I view the user data that's being passed? Eddie showed
us
> > in
> >> >> > the
> >> >> > class at Synergy but I apparently missed exactly how to view it.
> >> >> > I'm
> >> >> > using
> >> >> > FireBug but haven't found where it would display.
> >> >> >
> >> >> > Bob
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >
> >
> >
>
>
>

Edwin van der Velden
16-Jul-2007, 08:35 AM
Well, for the constraint it might matter a bit which you use. But both case
should be able to work just fine, the other differnence is the type of
field, when the field is not recognized it is sent as user data which
obviously doesn't work for a lookup currently, if it however recognizes it
as rowid (status) field it's in a differnt array of values, and the rowid
fields should get sent when opening a lookup.

So better, normally no, but a field that gets sent in the request is in this
case better then one that doesn't.

-Edwin


"Bob Worsley" <bworsley@comcast.net> wrote in message
news:tJbFRz6xHHA.5536@dacmail.dataaccess.com...
> The issue is one of timing. I think I need to grab the company ID when he
> logs on so that I have it before he retrieves data in a later screen since
> we're limiting that data to his company only. I'm not sure that rowid is
> any better for this, is it?
> Bob
>
> "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> message
> news:s5eQOv6xHHA.1940@dacmail.dataaccess.com...
>> That depends on your data structure I guess. Is the user_companyid
> refering
>> to the id of a company in a seperate table so you can get it's row id and
>> instead of adding a custom userdata field you add a rowid field for the
>> company. Rowid fields should be sent along in a lookup request.
>>
>> I have added it to our buglist.
>>
>>
>> -Edwin
>>
>>
>>
>> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> news:7qo2nj6xHHA.5536@dacmail.dataaccess.com...
>> > You are correct, it's there in the find:
>> >
>> > <m:TAjaxUserData>
>> > <m:sName>user_companyid</m:sName>
>> > <m:sValue>1</m:sValue>
>> > </m:TAjaxUserData>
>> >
>> > but not for the lookup. Then is there another way to do this? I tried
>> > using the vdfRemoteMethod functionality and it works sometimes, but
> isn't
>> > reliable.
>> > Bob
>> >
>> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
>> > message
>> > news:63KD9U6xHHA.1940@dacmail.dataaccess.com...
>> >> If I understood it correctly the companyid once set won't change, in
> that
>> >> case it is the right way to populate your hidden field. A simple test
> can
>> > be
>> >> done by changing the type to text so you can see the field and it's
> value
>> >> (ok while typing this I read you already set it was populated
>> >> correctly
>> >> so
>> >> prolly a nvm on this remark ;-)).
>> >>
>> >> Another thing though, I've tried it a bit myself but it may actually
>> >> be
>> > the
>> >> case then the lookup code does not send the user data. If you want to
>> >> try,
>> >> just repeat the same process to lookup your data post as described for
>> >> the
>> >> lookup only in this case do it for a find. You may notice that now it
>> >> does
>> >> have userdata in the request.
>> >>
>> >> If even a find does not send the user data along then you may want to
>> > check
>> >> if your field is inside to form, but for now I'll assume that you will
>> > find
>> >> userdata in a find request but not in a lookup request.
>> >>
>> >> -Edwin
>> >>
>> >>
>> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> >> news:4FWmtG6xHHA.1992@dacmail.dataaccess.com...
>> >> > Hmmmm.... the <aUserData></aUserData> tags are in all cases for
>> >> > this
>> >> > empty.
>> >> > I'm checking this when click the lookup button and get the lookup
>> > dialog.
>> >> > I
>> >> > was hoping to see what was passed back but maybe I'm looking in the
>> > wrong
>> >> > place.
>> >> >
>> >> > As to my hidden field, can I populate it like this:
>> >> >
>> >> > <input type="hidden" name="user_companyid"
>> >> > value="<%=iCompanyID%>" />
>> >> >
>> >> > the iCompanyID variable is populated correctly. But in the WO,
>> >> >
>> >> > Get GeTAjaxRequestUserData "user_companyid" to iCompanyId
>> >> >
>> >> > Always returns 0. I can't help but think I've got a simple syntax
>> >> > or
>> >> > timing
>> >> > error somewhere.
>> >> > Bob
>> >> >
>> >> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
>> >> > message
>> >> > news:HgTkp$3xHHA.5736@dacmail.dataaccess.com...
>> >> >> 1) From what I understand of it it does sound like it should be
>> > workable.
>> >> >>
>> >> >> 2) In firebug open the console, expand the POST line that was just
>> >> >> sent
>> >> >> on
>> >> >> lookup action and look at the Post tab, here you should find near
> the
>> >> >> bottom:
>> >> >> <aUserData></aUserData>Which contains any user data if there was
>> >> >> any
>> >> >> sent.qlternatively, you can debug and put a breakpoint in on of the
>> >> >> vdf
>> >> >> functions and see what the struct contains there.-Edwin
>> >> >>
>> >> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> >> >> news:SY4cAluxHHA.2024@dacmail.dataaccess.com...
>> >> >> >I need to constrain a lookup list and find in my WO. I see how
>> >> >> >the
>> >> > example
>> >> >> > did it, but I haven't been able to duplicate it. The one
> difference
>> > is
>> >> >> > that
>> >> >> > I've added a global variable to PageTop.Inc.asp that holds what I
>> > want
>> >> > to
>> >> >> > constrain to - a company ID so I have my value at login. I can
> see
>> > the
>> >> >> > value of this variable is correct in my program before the lookup
> is
>> >> >> > activated. I put the value into a hidden field named
>> > "user_companyid"
>> >> > and
>> >> >> > called it in OnAjaxRequestSetStart & GeTAjaxRequestUserData but
>> > cannot
>> >> >> > retrieve the value.
>> >> >> >
>> >> >> > 1) Is my concept sound?
>> >> >> >
>> >> >> > 2) How do I view the user data that's being passed? Eddie showed
> us
>> > in
>> >> >> > the
>> >> >> > class at Synergy but I apparently missed exactly how to view it.
>> >> >> > I'm
>> >> >> > using
>> >> >> > FireBug but haven't found where it would display.
>> >> >> >
>> >> >> > Bob
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >
>> >
>> >
>>
>>
>>
>
>
>

Bob Worsley
22-Jul-2007, 08:20 PM
I worked with this a bit this weekend and have not had any success. It's
not that I couldn't get the constraints to work your way, by use of RowId,
but more of how to get the RowId to the client so I could pass it back to
the server at the right time. Remember, my goal is to constrain lookups and
finds at the client based on something from the user's login record. That
means when the user logs in, I have to stash either his RecId, his company
ID, or his regular UserID and be able to pass it to the client for
constraining purposes. I had no trouble with passing up the ID but there's
apparently some bug in the system that won't pass that bit of data to the
back end.

The problem I had with RowId is how to pass it to the client as a RowId and
not a serializedRowId -- I couldn't get VdfRemoteMethodInvocation to pass a
rowid, only serialized. If serialized, I don't think Ajax would recognize
it as a RowId unless I set the user__rowid to the serialized rowid that I
passed from the server. If I do that I'm not sure just what would happen if
I saved the record at the client. I didn't really try this, just don't
think it would work. How is a rowid "recognized?"

Maybe I'm missing something simple here, but it's really biting me, not
being able to constrain the DD in this way. I've got a lot more development
on my site that will require this functionality.
Bob

"Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in message
news:%23m5gg46xHHA.5472@dacmail.dataaccess.com...
> Well, for the constraint it might matter a bit which you use. But both
case
> should be able to work just fine, the other differnence is the type of
> field, when the field is not recognized it is sent as user data which
> obviously doesn't work for a lookup currently, if it however recognizes it
> as rowid (status) field it's in a differnt array of values, and the rowid
> fields should get sent when opening a lookup.
>
> So better, normally no, but a field that gets sent in the request is in
this
> case better then one that doesn't.
>
> -Edwin
>
>
> "Bob Worsley" <bworsley@comcast.net> wrote in message
> news:tJbFRz6xHHA.5536@dacmail.dataaccess.com...
> > The issue is one of timing. I think I need to grab the company ID when
he
> > logs on so that I have it before he retrieves data in a later screen
since
> > we're limiting that data to his company only. I'm not sure that rowid
is
> > any better for this, is it?
> > Bob
> >
> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> > message
> > news:s5eQOv6xHHA.1940@dacmail.dataaccess.com...
> >> That depends on your data structure I guess. Is the user_companyid
> > refering
> >> to the id of a company in a seperate table so you can get it's row id
and
> >> instead of adding a custom userdata field you add a rowid field for the
> >> company. Rowid fields should be sent along in a lookup request.
> >>
> >> I have added it to our buglist.
> >>
> >>
> >> -Edwin
> >>
> >>
> >>
> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
> >> news:7qo2nj6xHHA.5536@dacmail.dataaccess.com...
> >> > You are correct, it's there in the find:
> >> >
> >> > <m:TAjaxUserData>
> >> > <m:sName>user_companyid</m:sName>
> >> > <m:sValue>1</m:sValue>
> >> > </m:TAjaxUserData>
> >> >
> >> > but not for the lookup. Then is there another way to do this? I
tried
> >> > using the vdfRemoteMethod functionality and it works sometimes, but
> > isn't
> >> > reliable.
> >> > Bob
> >> >
> >> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> >> > message
> >> > news:63KD9U6xHHA.1940@dacmail.dataaccess.com...
> >> >> If I understood it correctly the companyid once set won't change, in
> > that
> >> >> case it is the right way to populate your hidden field. A simple
test
> > can
> >> > be
> >> >> done by changing the type to text so you can see the field and it's
> > value
> >> >> (ok while typing this I read you already set it was populated
> >> >> correctly
> >> >> so
> >> >> prolly a nvm on this remark ;-)).
> >> >>
> >> >> Another thing though, I've tried it a bit myself but it may actually
> >> >> be
> >> > the
> >> >> case then the lookup code does not send the user data. If you want
to
> >> >> try,
> >> >> just repeat the same process to lookup your data post as described
for
> >> >> the
> >> >> lookup only in this case do it for a find. You may notice that now
it
> >> >> does
> >> >> have userdata in the request.
> >> >>
> >> >> If even a find does not send the user data along then you may want
to
> >> > check
> >> >> if your field is inside to form, but for now I'll assume that you
will
> >> > find
> >> >> userdata in a find request but not in a lookup request.
> >> >>
> >> >> -Edwin
> >> >>
> >> >>
> >> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
> >> >> news:4FWmtG6xHHA.1992@dacmail.dataaccess.com...
> >> >> > Hmmmm.... the <aUserData></aUserData> tags are in all cases for
> >> >> > this
> >> >> > empty.
> >> >> > I'm checking this when click the lookup button and get the lookup
> >> > dialog.
> >> >> > I
> >> >> > was hoping to see what was passed back but maybe I'm looking in
the
> >> > wrong
> >> >> > place.
> >> >> >
> >> >> > As to my hidden field, can I populate it like this:
> >> >> >
> >> >> > <input type="hidden" name="user_companyid"
> >> >> > value="<%=iCompanyID%>" />
> >> >> >
> >> >> > the iCompanyID variable is populated correctly. But in the WO,
> >> >> >
> >> >> > Get GeTAjaxRequestUserData "user_companyid" to
iCompanyId
> >> >> >
> >> >> > Always returns 0. I can't help but think I've got a simple syntax
> >> >> > or
> >> >> > timing
> >> >> > error somewhere.
> >> >> > Bob
> >> >> >
> >> >> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote
in
> >> >> > message
> >> >> > news:HgTkp$3xHHA.5736@dacmail.dataaccess.com...
> >> >> >> 1) From what I understand of it it does sound like it should be
> >> > workable.
> >> >> >>
> >> >> >> 2) In firebug open the console, expand the POST line that was
just
> >> >> >> sent
> >> >> >> on
> >> >> >> lookup action and look at the Post tab, here you should find near
> > the
> >> >> >> bottom:
> >> >> >> <aUserData></aUserData>Which contains any user data if there was
> >> >> >> any
> >> >> >> sent.qlternatively, you can debug and put a breakpoint in on of
the
> >> >> >> vdf
> >> >> >> functions and see what the struct contains there.-Edwin
> >> >> >>
> >> >> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
> >> >> >> news:SY4cAluxHHA.2024@dacmail.dataaccess.com...
> >> >> >> >I need to constrain a lookup list and find in my WO. I see how
> >> >> >> >the
> >> >> > example
> >> >> >> > did it, but I haven't been able to duplicate it. The one
> > difference
> >> > is
> >> >> >> > that
> >> >> >> > I've added a global variable to PageTop.Inc.asp that holds what
I
> >> > want
> >> >> > to
> >> >> >> > constrain to - a company ID so I have my value at login. I can
> > see
> >> > the
> >> >> >> > value of this variable is correct in my program before the
lookup
> > is
> >> >> >> > activated. I put the value into a hidden field named
> >> > "user_companyid"
> >> >> > and
> >> >> >> > called it in OnAjaxRequestSetStart & GeTAjaxRequestUserData but
> >> > cannot
> >> >> >> > retrieve the value.
> >> >> >> >
> >> >> >> > 1) Is my concept sound?
> >> >> >> >
> >> >> >> > 2) How do I view the user data that's being passed? Eddie
showed
> > us
> >> > in
> >> >> >> > the
> >> >> >> > class at Synergy but I apparently missed exactly how to view
it.
> >> >> >> > I'm
> >> >> >> > using
> >> >> >> > FireBug but haven't found where it would display.
> >> >> >> >
> >> >> >> > Bob
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >
> >
> >
>
>
>

Vincent Oorsprong
23-Jul-2007, 12:38 AM
Bob,

The reason there is a SerializeRowId / DeserializeRowId function pair is
that there are times that you need to pass the RowId to the outside world.
The outside world is in this case the browser so yes there is no way to pass
a "normal" RowId to the client. It should not matter too since the
constraint mechanism is not at the client but at the server side, all the
client will do is store and pass it along.

PS: Edwin has vacation for the next 14 days. Harm will pickup the other
things.

--
Regards,
Vincent Oorsprong
Data Access Europe B.V.
http://www.dataaccess.nl

Harm Wibier
23-Jul-2007, 05:06 AM
Hello Bob,

I see some unanswered questions in this thread:

1. The userdata isn't send with the lookup because the lookup works from its
own form. When the lookup is declared automatically using the following
syntax:`
<input class="LookupButton" type="button" title="List of all records"
tabindex="-1" vdfControlType="lookupdialog" vdfLookupTable="Customer"
vdfWebObject="oCustomer" vdfLookupFields="customer__customer_number,
customer__name, customer__address" />

A new form is created in the generated lookup that doesn't know the userdata
fields from it's parent form. The only way to do this currently is by
creating a lookup using the old fasion way:
<input class="LookupButton" type="button" title="List of all records"
tabindex="-1" vdfControlType="lookupdialog" vdfLookupTable="OrderHea"
vdfLookupFile="OrderList.asp" />

2. The extra vdfRemoteMethod call won't work because this is a completely
different request and VDF does not guarantee that the following requests are
handled by the same proces.

--
Regards,


Harm Wibier
Data Access Europe B.V.
http://www.dataaccess.nl/

"Bob Worsley" <bworsley@comcast.net> wrote in message
news:COrNsdMzHHA.3972@dacmail.dataaccess.com...
>I worked with this a bit this weekend and have not had any success. It's
> not that I couldn't get the constraints to work your way, by use of RowId,
> but more of how to get the RowId to the client so I could pass it back to
> the server at the right time. Remember, my goal is to constrain lookups
> and
> finds at the client based on something from the user's login record. That
> means when the user logs in, I have to stash either his RecId, his company
> ID, or his regular UserID and be able to pass it to the client for
> constraining purposes. I had no trouble with passing up the ID but
> there's
> apparently some bug in the system that won't pass that bit of data to the
> back end.
>
> The problem I had with RowId is how to pass it to the client as a RowId
> and
> not a serializedRowId -- I couldn't get VdfRemoteMethodInvocation to pass
> a
> rowid, only serialized. If serialized, I don't think Ajax would recognize
> it as a RowId unless I set the user__rowid to the serialized rowid that I
> passed from the server. If I do that I'm not sure just what would happen
> if
> I saved the record at the client. I didn't really try this, just don't
> think it would work. How is a rowid "recognized?"
>
> Maybe I'm missing something simple here, but it's really biting me, not
> being able to constrain the DD in this way. I've got a lot more
> development
> on my site that will require this functionality.
> Bob
>
> "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> message
> news:%23m5gg46xHHA.5472@dacmail.dataaccess.com...
>> Well, for the constraint it might matter a bit which you use. But both
> case
>> should be able to work just fine, the other differnence is the type of
>> field, when the field is not recognized it is sent as user data which
>> obviously doesn't work for a lookup currently, if it however recognizes
>> it
>> as rowid (status) field it's in a differnt array of values, and the rowid
>> fields should get sent when opening a lookup.
>>
>> So better, normally no, but a field that gets sent in the request is in
> this
>> case better then one that doesn't.
>>
>> -Edwin
>>
>>
>> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> news:tJbFRz6xHHA.5536@dacmail.dataaccess.com...
>> > The issue is one of timing. I think I need to grab the company ID when
> he
>> > logs on so that I have it before he retrieves data in a later screen
> since
>> > we're limiting that data to his company only. I'm not sure that rowid
> is
>> > any better for this, is it?
>> > Bob
>> >
>> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
>> > message
>> > news:s5eQOv6xHHA.1940@dacmail.dataaccess.com...
>> >> That depends on your data structure I guess. Is the user_companyid
>> > refering
>> >> to the id of a company in a seperate table so you can get it's row id
> and
>> >> instead of adding a custom userdata field you add a rowid field for
>> >> the
>> >> company. Rowid fields should be sent along in a lookup request.
>> >>
>> >> I have added it to our buglist.
>> >>
>> >>
>> >> -Edwin
>> >>
>> >>
>> >>
>> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> >> news:7qo2nj6xHHA.5536@dacmail.dataaccess.com...
>> >> > You are correct, it's there in the find:
>> >> >
>> >> > <m:TAjaxUserData>
>> >> > <m:sName>user_companyid</m:sName>
>> >> > <m:sValue>1</m:sValue>
>> >> > </m:TAjaxUserData>
>> >> >
>> >> > but not for the lookup. Then is there another way to do this? I
> tried
>> >> > using the vdfRemoteMethod functionality and it works sometimes, but
>> > isn't
>> >> > reliable.
>> >> > Bob
>> >> >
>> >> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
>> >> > message
>> >> > news:63KD9U6xHHA.1940@dacmail.dataaccess.com...
>> >> >> If I understood it correctly the companyid once set won't change,
>> >> >> in
>> > that
>> >> >> case it is the right way to populate your hidden field. A simple
> test
>> > can
>> >> > be
>> >> >> done by changing the type to text so you can see the field and it's
>> > value
>> >> >> (ok while typing this I read you already set it was populated
>> >> >> correctly
>> >> >> so
>> >> >> prolly a nvm on this remark ;-)).
>> >> >>
>> >> >> Another thing though, I've tried it a bit myself but it may
>> >> >> actually
>> >> >> be
>> >> > the
>> >> >> case then the lookup code does not send the user data. If you want
> to
>> >> >> try,
>> >> >> just repeat the same process to lookup your data post as described
> for
>> >> >> the
>> >> >> lookup only in this case do it for a find. You may notice that now
> it
>> >> >> does
>> >> >> have userdata in the request.
>> >> >>
>> >> >> If even a find does not send the user data along then you may want
> to
>> >> > check
>> >> >> if your field is inside to form, but for now I'll assume that you
> will
>> >> > find
>> >> >> userdata in a find request but not in a lookup request.
>> >> >>
>> >> >> -Edwin
>> >> >>
>> >> >>
>> >> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> >> >> news:4FWmtG6xHHA.1992@dacmail.dataaccess.com...
>> >> >> > Hmmmm.... the <aUserData></aUserData> tags are in all cases for
>> >> >> > this
>> >> >> > empty.
>> >> >> > I'm checking this when click the lookup button and get the lookup
>> >> > dialog.
>> >> >> > I
>> >> >> > was hoping to see what was passed back but maybe I'm looking in
> the
>> >> > wrong
>> >> >> > place.
>> >> >> >
>> >> >> > As to my hidden field, can I populate it like this:
>> >> >> >
>> >> >> > <input type="hidden" name="user_companyid"
>> >> >> > value="<%=iCompanyID%>" />
>> >> >> >
>> >> >> > the iCompanyID variable is populated correctly. But in the WO,
>> >> >> >
>> >> >> > Get GeTAjaxRequestUserData "user_companyid" to
> iCompanyId
>> >> >> >
>> >> >> > Always returns 0. I can't help but think I've got a simple
>> >> >> > syntax
>> >> >> > or
>> >> >> > timing
>> >> >> > error somewhere.
>> >> >> > Bob
>> >> >> >
>> >> >> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote
> in
>> >> >> > message
>> >> >> > news:HgTkp$3xHHA.5736@dacmail.dataaccess.com...
>> >> >> >> 1) From what I understand of it it does sound like it should be
>> >> > workable.
>> >> >> >>
>> >> >> >> 2) In firebug open the console, expand the POST line that was
> just
>> >> >> >> sent
>> >> >> >> on
>> >> >> >> lookup action and look at the Post tab, here you should find
>> >> >> >> near
>> > the
>> >> >> >> bottom:
>> >> >> >> <aUserData></aUserData>Which contains any user data if there was
>> >> >> >> any
>> >> >> >> sent.qlternatively, you can debug and put a breakpoint in on of
> the
>> >> >> >> vdf
>> >> >> >> functions and see what the struct contains there.-Edwin
>> >> >> >>
>> >> >> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> >> >> >> news:SY4cAluxHHA.2024@dacmail.dataaccess.com...
>> >> >> >> >I need to constrain a lookup list and find in my WO. I see how
>> >> >> >> >the
>> >> >> > example
>> >> >> >> > did it, but I haven't been able to duplicate it. The one
>> > difference
>> >> > is
>> >> >> >> > that
>> >> >> >> > I've added a global variable to PageTop.Inc.asp that holds
>> >> >> >> > what
> I
>> >> > want
>> >> >> > to
>> >> >> >> > constrain to - a company ID so I have my value at login. I
>> >> >> >> > can
>> > see
>> >> > the
>> >> >> >> > value of this variable is correct in my program before the
> lookup
>> > is
>> >> >> >> > activated. I put the value into a hidden field named
>> >> > "user_companyid"
>> >> >> > and
>> >> >> >> > called it in OnAjaxRequestSetStart & GeTAjaxRequestUserData
>> >> >> >> > but
>> >> > cannot
>> >> >> >> > retrieve the value.
>> >> >> >> >
>> >> >> >> > 1) Is my concept sound?
>> >> >> >> >
>> >> >> >> > 2) How do I view the user data that's being passed? Eddie
> showed
>> > us
>> >> > in
>> >> >> >> > the
>> >> >> >> > class at Synergy but I apparently missed exactly how to view
> it.
>> >> >> >> > I'm
>> >> >> >> > using
>> >> >> >> > FireBug but haven't found where it would display.
>> >> >> >> >
>> >> >> >> > Bob
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >
>> >
>> >
>>
>>
>>
>
>
>

Bob Worsley
23-Jul-2007, 07:05 AM
Welcome aboard, Harm, I understand that you're now on full time with DAW.
And for the next 14 days while Edwin is away I can pester you with my
interminable questions. <g>

I'm relatively new to WebApp, am still learning, so please bear with me on
some of my questions. When you say "the old fashioned way" do you mean pre
AJAX? Or the earlier Alpha method? I see it's calling a separate popup, so
isn't that the same thing? I'll try it the old way...

How would that work for regular finds, keeping in mind that a user can
"find" a record by both the lookup and with F9/F7/F8 and those would need to
be constrained too. I guess in those cases we aren't working in a separate
form so it should just work and the userdata should have the ID available.
Bob

"Harm Wibier" <harm.wibier@dataaccess.nl> wrote in message
news:EVmXzERzHHA.2452@dacmail.dataaccess.com...
> Hello Bob,
>
> I see some unanswered questions in this thread:
>
> 1. The userdata isn't send with the lookup because the lookup works from
its
> own form. When the lookup is declared automatically using the following
> syntax:`
> <input class="LookupButton" type="button" title="List of all records"
> tabindex="-1" vdfControlType="lookupdialog" vdfLookupTable="Customer"
> vdfWebObject="oCustomer" vdfLookupFields="customer__customer_number,
> customer__name, customer__address" />
>
> A new form is created in the generated lookup that doesn't know the
userdata
> fields from it's parent form. The only way to do this currently is by
> creating a lookup using the old fasion way:
> <input class="LookupButton" type="button" title="List of all records"
> tabindex="-1" vdfControlType="lookupdialog" vdfLookupTable="OrderHea"
> vdfLookupFile="OrderList.asp" />
>
> 2. The extra vdfRemoteMethod call won't work because this is a completely
> different request and VDF does not guarantee that the following requests
are
> handled by the same proces.
>
> --
> Regards,
>
>
> Harm Wibier
> Data Access Europe B.V.
> http://www.dataaccess.nl/
>
> "Bob Worsley" <bworsley@comcast.net> wrote in message
> news:COrNsdMzHHA.3972@dacmail.dataaccess.com...
> >I worked with this a bit this weekend and have not had any success. It's
> > not that I couldn't get the constraints to work your way, by use of
RowId,
> > but more of how to get the RowId to the client so I could pass it back
to
> > the server at the right time. Remember, my goal is to constrain lookups
> > and
> > finds at the client based on something from the user's login record.
That
> > means when the user logs in, I have to stash either his RecId, his
company
> > ID, or his regular UserID and be able to pass it to the client for
> > constraining purposes. I had no trouble with passing up the ID but
> > there's
> > apparently some bug in the system that won't pass that bit of data to
the
> > back end.
> >
> > The problem I had with RowId is how to pass it to the client as a RowId
> > and
> > not a serializedRowId -- I couldn't get VdfRemoteMethodInvocation to
pass
> > a
> > rowid, only serialized. If serialized, I don't think Ajax would
recognize
> > it as a RowId unless I set the user__rowid to the serialized rowid that
I
> > passed from the server. If I do that I'm not sure just what would
happen
> > if
> > I saved the record at the client. I didn't really try this, just don't
> > think it would work. How is a rowid "recognized?"
> >
> > Maybe I'm missing something simple here, but it's really biting me, not
> > being able to constrain the DD in this way. I've got a lot more
> > development
> > on my site that will require this functionality.
> > Bob
> >
> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> > message
> > news:%23m5gg46xHHA.5472@dacmail.dataaccess.com...
> >> Well, for the constraint it might matter a bit which you use. But both
> > case
> >> should be able to work just fine, the other differnence is the type of
> >> field, when the field is not recognized it is sent as user data which
> >> obviously doesn't work for a lookup currently, if it however recognizes
> >> it
> >> as rowid (status) field it's in a differnt array of values, and the
rowid
> >> fields should get sent when opening a lookup.
> >>
> >> So better, normally no, but a field that gets sent in the request is in
> > this
> >> case better then one that doesn't.
> >>
> >> -Edwin
> >>
> >>
> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
> >> news:tJbFRz6xHHA.5536@dacmail.dataaccess.com...
> >> > The issue is one of timing. I think I need to grab the company ID
when
> > he
> >> > logs on so that I have it before he retrieves data in a later screen
> > since
> >> > we're limiting that data to his company only. I'm not sure that
rowid
> > is
> >> > any better for this, is it?
> >> > Bob
> >> >
> >> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> >> > message
> >> > news:s5eQOv6xHHA.1940@dacmail.dataaccess.com...
> >> >> That depends on your data structure I guess. Is the user_companyid
> >> > refering
> >> >> to the id of a company in a seperate table so you can get it's row
id
> > and
> >> >> instead of adding a custom userdata field you add a rowid field for
> >> >> the
> >> >> company. Rowid fields should be sent along in a lookup request.
> >> >>
> >> >> I have added it to our buglist.
> >> >>
> >> >>
> >> >> -Edwin
> >> >>
> >> >>
> >> >>
> >> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
> >> >> news:7qo2nj6xHHA.5536@dacmail.dataaccess.com...
> >> >> > You are correct, it's there in the find:
> >> >> >
> >> >> > <m:TAjaxUserData>
> >> >> > <m:sName>user_companyid</m:sName>
> >> >> > <m:sValue>1</m:sValue>
> >> >> > </m:TAjaxUserData>
> >> >> >
> >> >> > but not for the lookup. Then is there another way to do this? I
> > tried
> >> >> > using the vdfRemoteMethod functionality and it works sometimes,
but
> >> > isn't
> >> >> > reliable.
> >> >> > Bob
> >> >> >
> >> >> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote
in
> >> >> > message
> >> >> > news:63KD9U6xHHA.1940@dacmail.dataaccess.com...
> >> >> >> If I understood it correctly the companyid once set won't change,
> >> >> >> in
> >> > that
> >> >> >> case it is the right way to populate your hidden field. A simple
> > test
> >> > can
> >> >> > be
> >> >> >> done by changing the type to text so you can see the field and
it's
> >> > value
> >> >> >> (ok while typing this I read you already set it was populated
> >> >> >> correctly
> >> >> >> so
> >> >> >> prolly a nvm on this remark ;-)).
> >> >> >>
> >> >> >> Another thing though, I've tried it a bit myself but it may
> >> >> >> actually
> >> >> >> be
> >> >> > the
> >> >> >> case then the lookup code does not send the user data. If you
want
> > to
> >> >> >> try,
> >> >> >> just repeat the same process to lookup your data post as
described
> > for
> >> >> >> the
> >> >> >> lookup only in this case do it for a find. You may notice that
now
> > it
> >> >> >> does
> >> >> >> have userdata in the request.
> >> >> >>
> >> >> >> If even a find does not send the user data along then you may
want
> > to
> >> >> > check
> >> >> >> if your field is inside to form, but for now I'll assume that you
> > will
> >> >> > find
> >> >> >> userdata in a find request but not in a lookup request.
> >> >> >>
> >> >> >> -Edwin
> >> >> >>
> >> >> >>
> >> >> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
> >> >> >> news:4FWmtG6xHHA.1992@dacmail.dataaccess.com...
> >> >> >> > Hmmmm.... the <aUserData></aUserData> tags are in all cases
for
> >> >> >> > this
> >> >> >> > empty.
> >> >> >> > I'm checking this when click the lookup button and get the
lookup
> >> >> > dialog.
> >> >> >> > I
> >> >> >> > was hoping to see what was passed back but maybe I'm looking in
> > the
> >> >> > wrong
> >> >> >> > place.
> >> >> >> >
> >> >> >> > As to my hidden field, can I populate it like this:
> >> >> >> >
> >> >> >> > <input type="hidden" name="user_companyid"
> >> >> >> > value="<%=iCompanyID%>" />
> >> >> >> >
> >> >> >> > the iCompanyID variable is populated correctly. But in the WO,
> >> >> >> >
> >> >> >> > Get GeTAjaxRequestUserData "user_companyid" to
> > iCompanyId
> >> >> >> >
> >> >> >> > Always returns 0. I can't help but think I've got a simple
> >> >> >> > syntax
> >> >> >> > or
> >> >> >> > timing
> >> >> >> > error somewhere.
> >> >> >> > Bob
> >> >> >> >
> >> >> >> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl>
wrote
> > in
> >> >> >> > message
> >> >> >> > news:HgTkp$3xHHA.5736@dacmail.dataaccess.com...
> >> >> >> >> 1) From what I understand of it it does sound like it should
be
> >> >> > workable.
> >> >> >> >>
> >> >> >> >> 2) In firebug open the console, expand the POST line that was
> > just
> >> >> >> >> sent
> >> >> >> >> on
> >> >> >> >> lookup action and look at the Post tab, here you should find
> >> >> >> >> near
> >> > the
> >> >> >> >> bottom:
> >> >> >> >> <aUserData></aUserData>Which contains any user data if there
was
> >> >> >> >> any
> >> >> >> >> sent.qlternatively, you can debug and put a breakpoint in on
of
> > the
> >> >> >> >> vdf
> >> >> >> >> functions and see what the struct contains there.-Edwin
> >> >> >> >>
> >> >> >> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
> >> >> >> >> news:SY4cAluxHHA.2024@dacmail.dataaccess.com...
> >> >> >> >> >I need to constrain a lookup list and find in my WO. I see
how
> >> >> >> >> >the
> >> >> >> > example
> >> >> >> >> > did it, but I haven't been able to duplicate it. The one
> >> > difference
> >> >> > is
> >> >> >> >> > that
> >> >> >> >> > I've added a global variable to PageTop.Inc.asp that holds
> >> >> >> >> > what
> > I
> >> >> > want
> >> >> >> > to
> >> >> >> >> > constrain to - a company ID so I have my value at login. I
> >> >> >> >> > can
> >> > see
> >> >> > the
> >> >> >> >> > value of this variable is correct in my program before the
> > lookup
> >> > is
> >> >> >> >> > activated. I put the value into a hidden field named
> >> >> > "user_companyid"
> >> >> >> > and
> >> >> >> >> > called it in OnAjaxRequestSetStart & GeTAjaxRequestUserData
> >> >> >> >> > but
> >> >> > cannot
> >> >> >> >> > retrieve the value.
> >> >> >> >> >
> >> >> >> >> > 1) Is my concept sound?
> >> >> >> >> >
> >> >> >> >> > 2) How do I view the user data that's being passed? Eddie
> > showed
> >> > us
> >> >> > in
> >> >> >> >> > the
> >> >> >> >> > class at Synergy but I apparently missed exactly how to view
> > it.
> >> >> >> >> > I'm
> >> >> >> >> > using
> >> >> >> >> > FireBug but haven't found where it would display.
> >> >> >> >> >
> >> >> >> >> > Bob
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >
> >
> >
>
>
>

Harm Wibier
23-Jul-2007, 10:04 AM
With old fashioned I mean the earlier Alpha method. A full example of this
method is available in the Ajax Order Entry Sample on the Order Entry page
(the first lookup). The popup is indeed loaded in an IFrame from a separate
ASP page. The "new style" is generated in DIV and is faster and less work to
create.

The function keys for the finds are usually applied on the current form
(according to the cursor / focus) and if that is the form with the user data
this data will be send to the server.

I'm indeed a full time member of the team now I've finished my study and
while everybody is on vacation I will be full time working on / with the
Ajax Library, so bring it on! ;)


--
Regards,


Harm Wibier
Data Access Europe B.V.
http://www.dataaccess.nl/


"Bob Worsley" <bworsley@comcast.net> wrote in message
news:mUDIYGSzHHA.3456@dacmail.dataaccess.com...
> Welcome aboard, Harm, I understand that you're now on full time with DAW.
> And for the next 14 days while Edwin is away I can pester you with my
> interminable questions. <g>
>
> I'm relatively new to WebApp, am still learning, so please bear with me on
> some of my questions. When you say "the old fashioned way" do you mean
> pre
> AJAX? Or the earlier Alpha method? I see it's calling a separate popup,
> so
> isn't that the same thing? I'll try it the old way...
>
> How would that work for regular finds, keeping in mind that a user can
> "find" a record by both the lookup and with F9/F7/F8 and those would need
> to
> be constrained too. I guess in those cases we aren't working in a
> separate
> form so it should just work and the userdata should have the ID available.
> Bob
>
> "Harm Wibier" <harm.wibier@dataaccess.nl> wrote in message
> news:EVmXzERzHHA.2452@dacmail.dataaccess.com...
>> Hello Bob,
>>
>> I see some unanswered questions in this thread:
>>
>> 1. The userdata isn't send with the lookup because the lookup works from
> its
>> own form. When the lookup is declared automatically using the following
>> syntax:`
>> <input class="LookupButton" type="button" title="List of all records"
>> tabindex="-1" vdfControlType="lookupdialog" vdfLookupTable="Customer"
>> vdfWebObject="oCustomer" vdfLookupFields="customer__customer_number,
>> customer__name, customer__address" />
>>
>> A new form is created in the generated lookup that doesn't know the
> userdata
>> fields from it's parent form. The only way to do this currently is by
>> creating a lookup using the old fasion way:
>> <input class="LookupButton" type="button" title="List of all records"
>> tabindex="-1" vdfControlType="lookupdialog" vdfLookupTable="OrderHea"
>> vdfLookupFile="OrderList.asp" />
>>
>> 2. The extra vdfRemoteMethod call won't work because this is a completely
>> different request and VDF does not guarantee that the following requests
> are
>> handled by the same proces.
>>
>> --
>> Regards,
>>
>>
>> Harm Wibier
>> Data Access Europe B.V.
>> http://www.dataaccess.nl/
>>
>> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> news:COrNsdMzHHA.3972@dacmail.dataaccess.com...
>> >I worked with this a bit this weekend and have not had any success.
>> >It's
>> > not that I couldn't get the constraints to work your way, by use of
> RowId,
>> > but more of how to get the RowId to the client so I could pass it back
> to
>> > the server at the right time. Remember, my goal is to constrain
>> > lookups
>> > and
>> > finds at the client based on something from the user's login record.
> That
>> > means when the user logs in, I have to stash either his RecId, his
> company
>> > ID, or his regular UserID and be able to pass it to the client for
>> > constraining purposes. I had no trouble with passing up the ID but
>> > there's
>> > apparently some bug in the system that won't pass that bit of data to
> the
>> > back end.
>> >
>> > The problem I had with RowId is how to pass it to the client as a RowId
>> > and
>> > not a serializedRowId -- I couldn't get VdfRemoteMethodInvocation to
> pass
>> > a
>> > rowid, only serialized. If serialized, I don't think Ajax would
> recognize
>> > it as a RowId unless I set the user__rowid to the serialized rowid that
> I
>> > passed from the server. If I do that I'm not sure just what would
> happen
>> > if
>> > I saved the record at the client. I didn't really try this, just don't
>> > think it would work. How is a rowid "recognized?"
>> >
>> > Maybe I'm missing something simple here, but it's really biting me, not
>> > being able to constrain the DD in this way. I've got a lot more
>> > development
>> > on my site that will require this functionality.
>> > Bob
>> >
>> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
>> > message
>> > news:%23m5gg46xHHA.5472@dacmail.dataaccess.com...
>> >> Well, for the constraint it might matter a bit which you use. But both
>> > case
>> >> should be able to work just fine, the other differnence is the type of
>> >> field, when the field is not recognized it is sent as user data which
>> >> obviously doesn't work for a lookup currently, if it however
>> >> recognizes
>> >> it
>> >> as rowid (status) field it's in a differnt array of values, and the
> rowid
>> >> fields should get sent when opening a lookup.
>> >>
>> >> So better, normally no, but a field that gets sent in the request is
>> >> in
>> > this
>> >> case better then one that doesn't.
>> >>
>> >> -Edwin
>> >>
>> >>
>> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> >> news:tJbFRz6xHHA.5536@dacmail.dataaccess.com...
>> >> > The issue is one of timing. I think I need to grab the company ID
> when
>> > he
>> >> > logs on so that I have it before he retrieves data in a later screen
>> > since
>> >> > we're limiting that data to his company only. I'm not sure that
> rowid
>> > is
>> >> > any better for this, is it?
>> >> > Bob
>> >> >
>> >> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
>> >> > message
>> >> > news:s5eQOv6xHHA.1940@dacmail.dataaccess.com...
>> >> >> That depends on your data structure I guess. Is the user_companyid
>> >> > refering
>> >> >> to the id of a company in a seperate table so you can get it's row
> id
>> > and
>> >> >> instead of adding a custom userdata field you add a rowid field for
>> >> >> the
>> >> >> company. Rowid fields should be sent along in a lookup request.
>> >> >>
>> >> >> I have added it to our buglist.
>> >> >>
>> >> >>
>> >> >> -Edwin
>> >> >>
>> >> >>
>> >> >>
>> >> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> >> >> news:7qo2nj6xHHA.5536@dacmail.dataaccess.com...
>> >> >> > You are correct, it's there in the find:
>> >> >> >
>> >> >> > <m:TAjaxUserData>
>> >> >> > <m:sName>user_companyid</m:sName>
>> >> >> > <m:sValue>1</m:sValue>
>> >> >> > </m:TAjaxUserData>
>> >> >> >
>> >> >> > but not for the lookup. Then is there another way to do this? I
>> > tried
>> >> >> > using the vdfRemoteMethod functionality and it works sometimes,
> but
>> >> > isn't
>> >> >> > reliable.
>> >> >> > Bob
>> >> >> >
>> >> >> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote
> in
>> >> >> > message
>> >> >> > news:63KD9U6xHHA.1940@dacmail.dataaccess.com...
>> >> >> >> If I understood it correctly the companyid once set won't
>> >> >> >> change,
>> >> >> >> in
>> >> > that
>> >> >> >> case it is the right way to populate your hidden field. A simple
>> > test
>> >> > can
>> >> >> > be
>> >> >> >> done by changing the type to text so you can see the field and
> it's
>> >> > value
>> >> >> >> (ok while typing this I read you already set it was populated
>> >> >> >> correctly
>> >> >> >> so
>> >> >> >> prolly a nvm on this remark ;-)).
>> >> >> >>
>> >> >> >> Another thing though, I've tried it a bit myself but it may
>> >> >> >> actually
>> >> >> >> be
>> >> >> > the
>> >> >> >> case then the lookup code does not send the user data. If you
> want
>> > to
>> >> >> >> try,
>> >> >> >> just repeat the same process to lookup your data post as
> described
>> > for
>> >> >> >> the
>> >> >> >> lookup only in this case do it for a find. You may notice that
> now
>> > it
>> >> >> >> does
>> >> >> >> have userdata in the request.
>> >> >> >>
>> >> >> >> If even a find does not send the user data along then you may
> want
>> > to
>> >> >> > check
>> >> >> >> if your field is inside to form, but for now I'll assume that
>> >> >> >> you
>> > will
>> >> >> > find
>> >> >> >> userdata in a find request but not in a lookup request.
>> >> >> >>
>> >> >> >> -Edwin
>> >> >> >>
>> >> >> >>
>> >> >> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> >> >> >> news:4FWmtG6xHHA.1992@dacmail.dataaccess.com...
>> >> >> >> > Hmmmm.... the <aUserData></aUserData> tags are in all cases
> for
>> >> >> >> > this
>> >> >> >> > empty.
>> >> >> >> > I'm checking this when click the lookup button and get the
> lookup
>> >> >> > dialog.
>> >> >> >> > I
>> >> >> >> > was hoping to see what was passed back but maybe I'm looking
>> >> >> >> > in
>> > the
>> >> >> > wrong
>> >> >> >> > place.
>> >> >> >> >
>> >> >> >> > As to my hidden field, can I populate it like this:
>> >> >> >> >
>> >> >> >> > <input type="hidden" name="user_companyid"
>> >> >> >> > value="<%=iCompanyID%>" />
>> >> >> >> >
>> >> >> >> > the iCompanyID variable is populated correctly. But in the
>> >> >> >> > WO,
>> >> >> >> >
>> >> >> >> > Get GeTAjaxRequestUserData "user_companyid" to
>> > iCompanyId
>> >> >> >> >
>> >> >> >> > Always returns 0. I can't help but think I've got a simple
>> >> >> >> > syntax
>> >> >> >> > or
>> >> >> >> > timing
>> >> >> >> > error somewhere.
>> >> >> >> > Bob
>> >> >> >> >
>> >> >> >> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl>
> wrote
>> > in
>> >> >> >> > message
>> >> >> >> > news:HgTkp$3xHHA.5736@dacmail.dataaccess.com...
>> >> >> >> >> 1) From what I understand of it it does sound like it should
> be
>> >> >> > workable.
>> >> >> >> >>
>> >> >> >> >> 2) In firebug open the console, expand the POST line that was
>> > just
>> >> >> >> >> sent
>> >> >> >> >> on
>> >> >> >> >> lookup action and look at the Post tab, here you should find
>> >> >> >> >> near
>> >> > the
>> >> >> >> >> bottom:
>> >> >> >> >> <aUserData></aUserData>Which contains any user data if there
> was
>> >> >> >> >> any
>> >> >> >> >> sent.qlternatively, you can debug and put a breakpoint in on
> of
>> > the
>> >> >> >> >> vdf
>> >> >> >> >> functions and see what the struct contains there.-Edwin
>> >> >> >> >>
>> >> >> >> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> >> >> >> >> news:SY4cAluxHHA.2024@dacmail.dataaccess.com...
>> >> >> >> >> >I need to constrain a lookup list and find in my WO. I see
> how
>> >> >> >> >> >the
>> >> >> >> > example
>> >> >> >> >> > did it, but I haven't been able to duplicate it. The one
>> >> > difference
>> >> >> > is
>> >> >> >> >> > that
>> >> >> >> >> > I've added a global variable to PageTop.Inc.asp that holds
>> >> >> >> >> > what
>> > I
>> >> >> > want
>> >> >> >> > to
>> >> >> >> >> > constrain to - a company ID so I have my value at login. I
>> >> >> >> >> > can
>> >> > see
>> >> >> > the
>> >> >> >> >> > value of this variable is correct in my program before the
>> > lookup
>> >> > is
>> >> >> >> >> > activated. I put the value into a hidden field named
>> >> >> > "user_companyid"
>> >> >> >> > and
>> >> >> >> >> > called it in OnAjaxRequestSetStart & GeTAjaxRequestUserData
>> >> >> >> >> > but
>> >> >> > cannot
>> >> >> >> >> > retrieve the value.
>> >> >> >> >> >
>> >> >> >> >> > 1) Is my concept sound?
>> >> >> >> >> >
>> >> >> >> >> > 2) How do I view the user data that's being passed? Eddie
>> > showed
>> >> > us
>> >> >> > in
>> >> >> >> >> > the
>> >> >> >> >> > class at Synergy but I apparently missed exactly how to
>> >> >> >> >> > view
>> > it.
>> >> >> >> >> > I'm
>> >> >> >> >> > using
>> >> >> >> >> > FireBug but haven't found where it would display.
>> >> >> >> >> >
>> >> >> >> >> > Bob
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >
>> >
>> >
>>
>>
>>
>
>
>

Bob Worsley
23-Jul-2007, 05:15 PM
I created the "old" style lookup, and even with a simple "find" I can't get
this to work. I think I see what I want in FireBug console, CDATA[1] is the
correct value for this field.

<TAjaxRequestCol>
<sName>user.companyid</sName>
<sType>D</sType>
<bChangedState>true</bChangedState>
<sValue><![CDATA[1]]></sValue>
</TAjaxRequestCol>

the problem is that Get GeTAjaxRequestUserData "user_companyid" to
iCompanyId in Procedure OnAjaxRequestSetStart in the WO doesn't retrieve it.
I think most of the problem is that I don't know if it should be pulling
from the above or not, as I really haven't a lot of experience with FireBug.
Bob

"Harm Wibier" <harm.wibier@dataaccess.nl> wrote in message
news:HwOJArTzHHA.4680@dacmail.dataaccess.com...
> With old fashioned I mean the earlier Alpha method. A full example of this
> method is available in the Ajax Order Entry Sample on the Order Entry page
> (the first lookup). The popup is indeed loaded in an IFrame from a
separate
> ASP page. The "new style" is generated in DIV and is faster and less work
to
> create.
>
> The function keys for the finds are usually applied on the current form
> (according to the cursor / focus) and if that is the form with the user
data
> this data will be send to the server.
>
> I'm indeed a full time member of the team now I've finished my study and
> while everybody is on vacation I will be full time working on / with the
> Ajax Library, so bring it on! ;)
>
>
> --
> Regards,
>
>
> Harm Wibier
> Data Access Europe B.V.
> http://www.dataaccess.nl/
>
>

Harm Wibier
24-Jul-2007, 01:34 AM
TAjaxRequestCol is the value of the column / field on the client. This isn't
a special user field that can be used with GetAjaxRequestUserData. This
fields are sent like:

<m:TAjaxUserData>
<m:sName>user_companyid</m:sName>
<m:sValue>1</m:sValue>
</m:TAjaxUserData>

Is the (hidden) user field for the constrain available in de lookup asp
within the form?

--
Regards,


Harm Wibier
Data Access Europe B.V.
http://www.dataaccess.nl/

"Bob Worsley" <bworsley@comcast.net> wrote in message
news:IN6RTbXzHHA.4568@dacmail.dataaccess.com...
>I created the "old" style lookup, and even with a simple "find" I can't get
> this to work. I think I see what I want in FireBug console, CDATA[1] is
> the
> correct value for this field.
>
> <TAjaxRequestCol>
> <sName>user.companyid</sName>
> <sType>D</sType>
> <bChangedState>true</bChangedState>
> <sValue><![CDATA[1]]></sValue>
> </TAjaxRequestCol>
>
> the problem is that Get GeTAjaxRequestUserData "user_companyid" to
> iCompanyId in Procedure OnAjaxRequestSetStart in the WO doesn't retrieve
> it.
> I think most of the problem is that I don't know if it should be pulling
> from the above or not, as I really haven't a lot of experience with
> FireBug.
> Bob
>
> "Harm Wibier" <harm.wibier@dataaccess.nl> wrote in message
> news:HwOJArTzHHA.4680@dacmail.dataaccess.com...
>> With old fashioned I mean the earlier Alpha method. A full example of
>> this
>> method is available in the Ajax Order Entry Sample on the Order Entry
>> page
>> (the first lookup). The popup is indeed loaded in an IFrame from a
> separate
>> ASP page. The "new style" is generated in DIV and is faster and less work
> to
>> create.
>>
>> The function keys for the finds are usually applied on the current form
>> (according to the cursor / focus) and if that is the form with the user
> data
>> this data will be send to the server.
>>
>> I'm indeed a full time member of the team now I've finished my study and
>> while everybody is on vacation I will be full time working on / with the
>> Ajax Library, so bring it on! ;)
>>
>>
>> --
>> Regards,
>>
>>
>> Harm Wibier
>> Data Access Europe B.V.
>> http://www.dataaccess.nl/
>>
>>
>
>
>

Bob Worsley
24-Jul-2007, 07:21 AM
No, the hidden field is not a part of the lookup. I'd need to figure out
how to pass it it since it's a value I'm passing along from the login
record.
Bob

"Harm Wibier" <harm.wibier@dataaccess.nl> wrote in message
news:ZnqQmybzHHA.2024@dacmail.dataaccess.com...
> TAjaxRequestCol is the value of the column / field on the client. This
isn't
> a special user field that can be used with GetAjaxRequestUserData. This
> fields are sent like:
>
> <m:TAjaxUserData>
> <m:sName>user_companyid</m:sName>
> <m:sValue>1</m:sValue>
> </m:TAjaxUserData>
>
> Is the (hidden) user field for the constrain available in de lookup asp
> within the form?
>
> --
> Regards,
>
>
> Harm Wibier
> Data Access Europe B.V.
> http://www.dataaccess.nl/
>
> "Bob Worsley" <bworsley@comcast.net> wrote in message
> news:IN6RTbXzHHA.4568@dacmail.dataaccess.com...
> >I created the "old" style lookup, and even with a simple "find" I can't
get
> > this to work. I think I see what I want in FireBug console, CDATA[1] is
> > the
> > correct value for this field.
> >
> > <TAjaxRequestCol>
> > <sName>user.companyid</sName>
> > <sType>D</sType>
> > <bChangedState>true</bChangedState>
> > <sValue><![CDATA[1]]></sValue>
> > </TAjaxRequestCol>
> >
> > the problem is that Get GeTAjaxRequestUserData "user_companyid" to
> > iCompanyId in Procedure OnAjaxRequestSetStart in the WO doesn't retrieve
> > it.
> > I think most of the problem is that I don't know if it should be pulling
> > from the above or not, as I really haven't a lot of experience with
> > FireBug.
> > Bob
> >
> > "Harm Wibier" <harm.wibier@dataaccess.nl> wrote in message
> > news:HwOJArTzHHA.4680@dacmail.dataaccess.com...
> >> With old fashioned I mean the earlier Alpha method. A full example of
> >> this
> >> method is available in the Ajax Order Entry Sample on the Order Entry
> >> page
> >> (the first lookup). The popup is indeed loaded in an IFrame from a
> > separate
> >> ASP page. The "new style" is generated in DIV and is faster and less
work
> > to
> >> create.
> >>
> >> The function keys for the finds are usually applied on the current form
> >> (according to the cursor / focus) and if that is the form with the user
> > data
> >> this data will be send to the server.
> >>
> >> I'm indeed a full time member of the team now I've finished my study
and
> >> while everybody is on vacation I will be full time working on / with
the
> >> Ajax Library, so bring it on! ;)
> >>
> >>
> >> --
> >> Regards,
> >>
> >>
> >> Harm Wibier
> >> Data Access Europe B.V.
> >> http://www.dataaccess.nl/
> >>
> >>
> >
> >
> >
>
>
>

Bob Worsley
24-Jul-2007, 07:27 AM
"so bring it on!" - want to take a stab at my last question in "Customize
the custom dialog?"

Summarizing it all, I'm trying to extract the value the user manually types
into the input field in the following popup custom dialog. If you set
"value" to something, that shows as expected, but manually entered text
cannot be extracted in a Javascript function by any means I've tried.
Bob

<div id="DialogHTMLContainer" style="display: none;">
<div style="margin:4px;">
<div style="font-weight: bold; margin-bottom: 10px;">Dialog
Caption</div>
<div><input type="text" id="text" value="" />
</div>
</div>
</div>

<!-- button -->
<span onclick="browser.gui.dialog(200,100,'This is a
dialog',document.getElementById('DialogHTMLContain er').innerHTML);">Click
Me</span>

<input class="ActionButton" type="Button" value="Show Me" onclick="test()"
/>

And the Javascript function where I'm trying to extract the value:

<script type="text/javascript">
function test(){
alert(document.getElementById("text").value)
}
</script>


"Harm Wibier" <harm.wibier@dataaccess.nl> wrote in message
news:HwOJArTzHHA.4680@dacmail.dataaccess.com...
> With old fashioned I mean the earlier Alpha method. A full example of this
> method is available in the Ajax Order Entry Sample on the Order Entry page
> (the first lookup). The popup is indeed loaded in an IFrame from a
separate
> ASP page. The "new style" is generated in DIV and is faster and less work
to
> create.
>
> The function keys for the finds are usually applied on the current form
> (according to the cursor / focus) and if that is the form with the user
data
> this data will be send to the server.
>
> I'm indeed a full time member of the team now I've finished my study and
> while everybody is on vacation I will be full time working on / with the
> Ajax Library, so bring it on! ;)
>
>
> --
> Regards,
>
>
> Harm Wibier
> Data Access Europe B.V.
> http://www.dataaccess.nl/
>

Harm Wibier
24-Jul-2007, 10:04 AM
I thought the value was a session value or something so it wouldn't be a
problem to use it in the lookup file. My next idea was to fetch the value
using javascript in the initForm method of the lookup, but this won't work
because at the point the first find messages are already sent in a lookup.
So will add to the TODO list to look over the initialization process for the
next version.

The last idea is overloading the PopLookup function from VdfLookupDialog.js.
It should be possible by just defining a new one in the asp file from which
the lookup is opened. I haven't tested this but it should work.


--
Regards,


Harm Wibier
Data Access Europe B.V.
http://www.dataaccess.nl/


"Bob Worsley" <bworsley@comcast.net> wrote in message
news:6htmqzezHHA.3456@dacmail.dataaccess.com...
> No, the hidden field is not a part of the lookup. I'd need to figure out
> how to pass it it since it's a value I'm passing along from the login
> record.
> Bob
>
> "Harm Wibier" <harm.wibier@dataaccess.nl> wrote in message
> news:ZnqQmybzHHA.2024@dacmail.dataaccess.com...
>> TAjaxRequestCol is the value of the column / field on the client. This
> isn't
>> a special user field that can be used with GetAjaxRequestUserData. This
>> fields are sent like:
>>
>> <m:TAjaxUserData>
>> <m:sName>user_companyid</m:sName>
>> <m:sValue>1</m:sValue>
>> </m:TAjaxUserData>
>>
>> Is the (hidden) user field for the constrain available in de lookup asp
>> within the form?
>>
>> --
>> Regards,
>>
>>
>> Harm Wibier
>> Data Access Europe B.V.
>> http://www.dataaccess.nl/
>>
>> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> news:IN6RTbXzHHA.4568@dacmail.dataaccess.com...
>> >I created the "old" style lookup, and even with a simple "find" I can't
> get
>> > this to work. I think I see what I want in FireBug console, CDATA[1]
>> > is
>> > the
>> > correct value for this field.
>> >
>> > <TAjaxRequestCol>
>> > <sName>user.companyid</sName>
>> > <sType>D</sType>
>> > <bChangedState>true</bChangedState>
>> > <sValue><![CDATA[1]]></sValue>
>> > </TAjaxRequestCol>
>> >
>> > the problem is that Get GeTAjaxRequestUserData "user_companyid" to
>> > iCompanyId in Procedure OnAjaxRequestSetStart in the WO doesn't
>> > retrieve
>> > it.
>> > I think most of the problem is that I don't know if it should be
>> > pulling
>> > from the above or not, as I really haven't a lot of experience with
>> > FireBug.
>> > Bob
>> >
>> > "Harm Wibier" <harm.wibier@dataaccess.nl> wrote in message
>> > news:HwOJArTzHHA.4680@dacmail.dataaccess.com...
>> >> With old fashioned I mean the earlier Alpha method. A full example of
>> >> this
>> >> method is available in the Ajax Order Entry Sample on the Order Entry
>> >> page
>> >> (the first lookup). The popup is indeed loaded in an IFrame from a
>> > separate
>> >> ASP page. The "new style" is generated in DIV and is faster and less
> work
>> > to
>> >> create.
>> >>
>> >> The function keys for the finds are usually applied on the current
>> >> form
>> >> (according to the cursor / focus) and if that is the form with the
>> >> user
>> > data
>> >> this data will be send to the server.
>> >>
>> >> I'm indeed a full time member of the team now I've finished my study
> and
>> >> while everybody is on vacation I will be full time working on / with
> the
>> >> Ajax Library, so bring it on! ;)
>> >>
>> >>
>> >> --
>> >> Regards,
>> >>
>> >>
>> >> Harm Wibier
>> >> Data Access Europe B.V.
>> >> http://www.dataaccess.nl/
>> >>
>> >>
>> >
>> >
>> >
>>
>>
>>
>
>
>

Bob Worsley
24-Jul-2007, 10:21 PM
This might work Harm, but I don't have the Javascript expertise to know how
to do it - overloading is easy, but not sure about the variable side. And
as to the value I'm constraining to, it's in the user file, I've added a
company ID field. So, it could be in a cookie or a session variable, it
really doesn't matter.

The other side of this is that I haven't even been able to make constraints
work with a simple find. I really feel that this is a huge hole in the
product given the rest of it's capabilities.
Bob

"Harm Wibier" <harm.wibier@dataaccess.nl> wrote in message
news:Mln7$PgzHHA.2016@dacmail.dataaccess.com...
> I thought the value was a session value or something so it wouldn't be a
> problem to use it in the lookup file. My next idea was to fetch the value
> using javascript in the initForm method of the lookup, but this won't work
> because at the point the first find messages are already sent in a lookup.
> So will add to the TODO list to look over the initialization process for
the
> next version.
>
> The last idea is overloading the PopLookup function from
VdfLookupDialog.js.
> It should be possible by just defining a new one in the asp file from
which
> the lookup is opened. I haven't tested this but it should work.
>
>
> --
> Regards,
>
>
> Harm Wibier
> Data Access Europe B.V.
> http://www.dataaccess.nl/
>
>
> "Bob Worsley" <bworsley@comcast.net> wrote in message
> news:6htmqzezHHA.3456@dacmail.dataaccess.com...
> > No, the hidden field is not a part of the lookup. I'd need to figure
out
> > how to pass it it since it's a value I'm passing along from the login
> > record.
> > Bob
> >
> > "Harm Wibier" <harm.wibier@dataaccess.nl> wrote in message
> > news:ZnqQmybzHHA.2024@dacmail.dataaccess.com...
> >> TAjaxRequestCol is the value of the column / field on the client. This
> > isn't
> >> a special user field that can be used with GetAjaxRequestUserData. This
> >> fields are sent like:
> >>
> >> <m:TAjaxUserData>
> >> <m:sName>user_companyid</m:sName>
> >> <m:sValue>1</m:sValue>
> >> </m:TAjaxUserData>
> >>
> >> Is the (hidden) user field for the constrain available in de lookup asp
> >> within the form?
> >>
> >> --
> >> Regards,
> >>
> >>
> >> Harm Wibier
> >> Data Access Europe B.V.
> >> http://www.dataaccess.nl/
> >>
> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
> >> news:IN6RTbXzHHA.4568@dacmail.dataaccess.com...
> >> >I created the "old" style lookup, and even with a simple "find" I
can't
> > get
> >> > this to work. I think I see what I want in FireBug console, CDATA[1]
> >> > is
> >> > the
> >> > correct value for this field.
> >> >
> >> > <TAjaxRequestCol>
> >> > <sName>user.companyid</sName>
> >> > <sType>D</sType>
> >> > <bChangedState>true</bChangedState>
> >> > <sValue><![CDATA[1]]></sValue>
> >> > </TAjaxRequestCol>
> >> >
> >> > the problem is that Get GeTAjaxRequestUserData "user_companyid" to
> >> > iCompanyId in Procedure OnAjaxRequestSetStart in the WO doesn't
> >> > retrieve
> >> > it.
> >> > I think most of the problem is that I don't know if it should be
> >> > pulling
> >> > from the above or not, as I really haven't a lot of experience with
> >> > FireBug.
> >> > Bob
> >> >
> >> > "Harm Wibier" <harm.wibier@dataaccess.nl> wrote in message
> >> > news:HwOJArTzHHA.4680@dacmail.dataaccess.com...
> >> >> With old fashioned I mean the earlier Alpha method. A full example
of
> >> >> this
> >> >> method is available in the Ajax Order Entry Sample on the Order
Entry
> >> >> page
> >> >> (the first lookup). The popup is indeed loaded in an IFrame from a
> >> > separate
> >> >> ASP page. The "new style" is generated in DIV and is faster and less
> > work
> >> > to
> >> >> create.
> >> >>
> >> >> The function keys for the finds are usually applied on the current
> >> >> form
> >> >> (according to the cursor / focus) and if that is the form with the
> >> >> user
> >> > data
> >> >> this data will be send to the server.
> >> >>
> >> >> I'm indeed a full time member of the team now I've finished my study
> > and
> >> >> while everybody is on vacation I will be full time working on / with
> > the
> >> >> Ajax Library, so bring it on! ;)
> >> >>
> >> >>
> >> >> --
> >> >> Regards,
> >> >>
> >> >>
> >> >> Harm Wibier
> >> >> Data Access Europe B.V.
> >> >> http://www.dataaccess.nl/
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >
> >
> >
>
>
>

Bob Worsley
25-Jul-2007, 06:58 PM
The problem is solved, I have success. The solution was not to use a
variable designated as a database field, user__company_id to pass the
variable as I was trying to do. Instead, use anything else as the hidden
variable... user_company_id worked nicely -- single underline, not double.
I was under the impression that only database fields would get passed to the
back end, something the framework would recognize.

Oh, and I could only make this work with the "old" style lookup, and by
adding the hidden field there as well as in the main page. In the lookup
for constraining the lookup, in the main page for function key finds.

It's little bits of knowledge like this that can make or break the process
of building the application. Or the lack thereof....

Thanks for all the help guys
Bob

"Bob Worsley" <bworsley@comcast.net> wrote in message
news:u0ul1qmzHHA.6008@dacmail.dataaccess.com...
> This might work Harm, but I don't have the Javascript expertise to know
how
> to do it - overloading is easy, but not sure about the variable side. And
> as to the value I'm constraining to, it's in the user file, I've added a
> company ID field. So, it could be in a cookie or a session variable, it
> really doesn't matter.
>
> The other side of this is that I haven't even been able to make
constraints
> work with a simple find. I really feel that this is a huge hole in the
> product given the rest of it's capabilities.
> Bob
>
> "Harm Wibier" <harm.wibier@dataaccess.nl> wrote in message
> news:Mln7$PgzHHA.2016@dacmail.dataaccess.com...
> > I thought the value was a session value or something so it wouldn't be a
> > problem to use it in the lookup file. My next idea was to fetch the
value
> > using javascript in the initForm method of the lookup, but this won't
work
> > because at the point the first find messages are already sent in a
lookup.
> > So will add to the TODO list to look over the initialization process for
> the
> > next version.
> >
> > The last idea is overloading the PopLookup function from
> VdfLookupDialog.js.
> > It should be possible by just defining a new one in the asp file from
> which
> > the lookup is opened. I haven't tested this but it should work.
> >
> >
> > --
> > Regards,
> >
> >
> > Harm Wibier
> > Data Access Europe B.V.
> > http://www.dataaccess.nl/
> >
> >
> > "Bob Worsley" <bworsley@comcast.net> wrote in message
> > news:6htmqzezHHA.3456@dacmail.dataaccess.com...
> > > No, the hidden field is not a part of the lookup. I'd need to figure
> out
> > > how to pass it it since it's a value I'm passing along from the login
> > > record.
> > > Bob
> > >
> > > "Harm Wibier" <harm.wibier@dataaccess.nl> wrote in message
> > > news:ZnqQmybzHHA.2024@dacmail.dataaccess.com...
> > >> TAjaxRequestCol is the value of the column / field on the client.
This
> > > isn't
> > >> a special user field that can be used with GetAjaxRequestUserData.
This
> > >> fields are sent like:
> > >>
> > >> <m:TAjaxUserData>
> > >> <m:sName>user_companyid</m:sName>
> > >> <m:sValue>1</m:sValue>
> > >> </m:TAjaxUserData>
> > >>
> > >> Is the (hidden) user field for the constrain available in de lookup
asp
> > >> within the form?
> > >>
> > >> --
> > >> Regards,
> > >>
> > >>
> > >> Harm Wibier
> > >> Data Access Europe B.V.
> > >> http://www.dataaccess.nl/
> > >>
> > >> "Bob Worsley" <bworsley@comcast.net> wrote in message
> > >> news:IN6RTbXzHHA.4568@dacmail.dataaccess.com...
> > >> >I created the "old" style lookup, and even with a simple "find" I
> can't
> > > get
> > >> > this to work. I think I see what I want in FireBug console,
CDATA[1]
> > >> > is
> > >> > the
> > >> > correct value for this field.
> > >> >
> > >> > <TAjaxRequestCol>
> > >> > <sName>user.companyid</sName>
> > >> > <sType>D</sType>
> > >> > <bChangedState>true</bChangedState>
> > >> > <sValue><![CDATA[1]]></sValue>
> > >> > </TAjaxRequestCol>
> > >> >
> > >> > the problem is that Get GeTAjaxRequestUserData "user_companyid" to
> > >> > iCompanyId in Procedure OnAjaxRequestSetStart in the WO doesn't
> > >> > retrieve
> > >> > it.
> > >> > I think most of the problem is that I don't know if it should be
> > >> > pulling
> > >> > from the above or not, as I really haven't a lot of experience with
> > >> > FireBug.
> > >> > Bob
> > >> >
> > >> > "Harm Wibier" <harm.wibier@dataaccess.nl> wrote in message
> > >> > news:HwOJArTzHHA.4680@dacmail.dataaccess.com...
> > >> >> With old fashioned I mean the earlier Alpha method. A full example
> of
> > >> >> this
> > >> >> method is available in the Ajax Order Entry Sample on the Order
> Entry
> > >> >> page
> > >> >> (the first lookup). The popup is indeed loaded in an IFrame from a
> > >> > separate
> > >> >> ASP page. The "new style" is generated in DIV and is faster and
less
> > > work
> > >> > to
> > >> >> create.
> > >> >>
> > >> >> The function keys for the finds are usually applied on the current
> > >> >> form
> > >> >> (according to the cursor / focus) and if that is the form with the
> > >> >> user
> > >> > data
> > >> >> this data will be send to the server.
> > >> >>
> > >> >> I'm indeed a full time member of the team now I've finished my
study
> > > and
> > >> >> while everybody is on vacation I will be full time working on /
with
> > > the
> > >> >> Ajax Library, so bring it on! ;)
> > >> >>
> > >> >>
> > >> >> --
> > >> >> Regards,
> > >> >>
> > >> >>
> > >> >> Harm Wibier
> > >> >> Data Access Europe B.V.
> > >> >> http://www.dataaccess.nl/
> > >> >>
> > >> >>
> > >> >
> > >> >
> > >> >
> > >>
> > >>
> > >>
> > >
> > >
> > >
> >
> >
> >
>
>
>
>