PDA

View Full Version : Unrelated table lookups



Bob Worsley
1-Jun-2007, 08:49 PM
I've found that when using this new feature in my program, in the DD where
I've got the lookup I have to set Set DDO_Server to the lookup file. This
is a bit of a departure from the norm since the two files aren't really
related. You might want to mention this in the docs, it took me a little
while to figure out what was causing all of the errors.
Bob

Bob Worsley
3-Jun-2007, 07:59 AM
After working with this for a couple of hours I've come to the conclusion
that all files that are utilized in any Ajax style view must be related in
some way to the main file. If not, and used in a list, you will get the
following error for each data field used.

Unknown field in headerrow: milelog__date (VdfList: MileLog_grid)

I've attempted to use vdfAttachedFields with a file that's not related to
the main file and get the above errors. I've placed an unrelated file in a
table on a tab in my program and get the above errors. In both cases if I
simply add the Set DDO_Server... to the main DD for the particular file and
the errors go away. Of course since the files are not related I get bunches
of errors about missing IDs and so forth, all due to the related files that
aren't really related.

Is this by design? Or is there some property that I need to set that I
missed somewhere? At this point I'm dead in the water, and need some
guidelines on the limitations of building a program or how to get around the
above.

Bob


"Bob Worsley" <bworsley@comcast.net> wrote in message
news:04MpNgLpHHA.312@dacmail.dataaccess.com...
> I've found that when using this new feature in my program, in the DD where
> I've got the lookup I have to set Set DDO_Server to the lookup file. This
> is a bit of a departure from the norm since the two files aren't really
> related. You might want to mention this in the docs, it took me a little
> while to figure out what was causing all of the errors.
> Bob
>
>
>
>

Vincent Oorsprong
4-Jun-2007, 03:18 AM
Bob,

While I am not the expert in this I can say that this was always the case
with WebApps. The system starts with the main_dd and all tables used must be
linked from there.

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

BO Lincoln
4-Jun-2007, 12:29 PM
Bob-

Are you sucessfully using a non-related system file in your webapp?

-BO Lincoln

Bob Worsley
4-Jun-2007, 07:20 PM
Nope. As I said, the non-related table has to be included in the main table
relationship with the "set DDO_Server" statement or it will not work. And
then try to save or delete any changes to the main file, you get errors on
missing IDs...
Bob

"David W. Lincoln" <dwl@lincolnsystems.us> wrote in message
news:sJ6Nm3spHHA.5572@dacmail.dataaccess.com...
> Bob-
>
> Are you sucessfully using a non-related system file in your webapp?
>
> -BO Lincoln
>
>
>

Bob Worsley
4-Jun-2007, 07:23 PM
True, except that we had a change in the latest Ajax release that was
designed to support this concept. Except that I can't make it work. So
maybe you're still right... <g>
Bob

"Vincent Oorsprong" <vincent.oorsprong@reply.at.newsgroup.nl> wrote in
message news:nezJwRopHHA.3152@dacmail.dataaccess.com...
> Bob,
>
> While I am not the expert in this I can say that this was always the case
> with WebApps. The system starts with the main_dd and all tables used must
> be linked from there.
>
> --
> Regards,
> Vincent Oorsprong
> Data Access Europe B.V.
> http://www.dataaccess.nl
>

Edwin van der Velden
5-Jun-2007, 03:39 AM
You should be able to use unrelated files using another web object, for
example the AJAX Wines example has a Wines.wo with :

Object oSizes_DD is a Sizes_DataDictionary
End_Object

Object oLocation_DD is a Location_DataDictionary
End_Object

Object oTypes_DD is a Types_DataDictionary
End_Object

Object oWines_DD is a Wines_DataDictionary
Set DDO_Server to oSizes_DD
Set DDO_Server to oLocation_DD
Set DDO_Server to oTypes_DD
Send DefineAllExtendedFields
End_Object

Set Main_DD to oWines_DD

Then on the page a simple input which loads the value of the wines.vintner
field
<input name="wines__vintner" style="width:28em;" />

To choose a differnt vintnr there is a lookup with a list from all vintners
in the vintners table, which is not related with any other table.
This lookup looks like:

<input class="LookupButton" type="button" title="Select a vintner"
tabindex="-1" vdfControlType="lookupdialog" vdfWebObject="oVintner"
vdfLookupTable="Vintners" vdfAttachedFields="wines__vintner"
vdfLookupFields="vintners__name" />

Now instead of using Wines.wo and adding the Vintner DDO and DDO_Server line
for it, which would work but doesn't really sound like the right way to go
as it's not actually related like you mentioned you see it will use
Vitner.wo which has:

Object oVintners_DD is a Vintners_DataDictionary
End_Object

Set Main_DD to oVintners_DD

This way you can use a unrelated table to supply values for you.

-Edwin




"Bob Worsley" <bworsley@comcast.net> wrote in message
news:04MpNgLpHHA.312@dacmail.dataaccess.com...
> I've found that when using this new feature in my program, in the DD where
> I've got the lookup I have to set Set DDO_Server to the lookup file. This
> is a bit of a departure from the norm since the two files aren't really
> related. You might want to mention this in the docs, it took me a little
> while to figure out what was causing all of the errors.
> Bob
>
>
>

Bob Worsley
5-Jun-2007, 08:11 PM
There seems to be at least four pieces to this puzzle, and now maybe a
fifth. To create a non-related lookup file:
1) Create a .wo for the lookup file.
2) Set the vdfWebObject for the lookup to the new .wo object
3) Create a rowid hidden field for the lookup file that points to the new
..wo object
4) Set up the vdfAttachedFields stuff per the release notes.

I can now get the lookup to pop up and show the list of lookup data as
expected without having to have the lookup file in the main wo. However,
the rub is that when I select a record in the lookup, I get the error(s)
below, as copied from FireFox. Sysdlr is my lookup file, "Service" is the
main DD where I'm doing the lookup.

this.aTables[sMainTable] has no properties
getRequestSet("findByRowId", 1, "sysdlr", 1, "", "",
"<TAjaxRequestCol>\n<sName>service.rowid</sName>\n<sType>D</sType>\n<bChange
dState>false</bChangedState>...", undefined)VdfForm.js (line 963)
doFindByRowId("sysdlr", "fe020000", undefined)VdfForm.js (line 508)
finished(true)VdfLookupDialog.j... (line 419)
onEnter()VdfLookupDialog.j... (line 405)
onRecordDoubleClick(dblclick clientX=0, clientY=0)VdfList.js (line 1868)
sFieldValues += this.aTables[sMainTable].getDataXml();

We're close! Of course "close" only counts in horseshoes and hand grenades.

Bob

"Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in message
news:lvEuN00pHHA.3152@dacmail.dataaccess.com...
> You should be able to use unrelated files using another web object, for
> example the AJAX Wines example has a Wines.wo with :
>
> Object oSizes_DD is a Sizes_DataDictionary
> End_Object
>
> Object oLocation_DD is a Location_DataDictionary
> End_Object
>
> Object oTypes_DD is a Types_DataDictionary
> End_Object
>
> Object oWines_DD is a Wines_DataDictionary
> Set DDO_Server to oSizes_DD
> Set DDO_Server to oLocation_DD
> Set DDO_Server to oTypes_DD
> Send DefineAllExtendedFields
> End_Object
>
> Set Main_DD to oWines_DD
>
> Then on the page a simple input which loads the value of the wines.vintner
> field
> <input name="wines__vintner" style="width:28em;" />
>
> To choose a differnt vintnr there is a lookup with a list from all
vintners
> in the vintners table, which is not related with any other table.
> This lookup looks like:
>
> <input class="LookupButton" type="button" title="Select a vintner"
> tabindex="-1" vdfControlType="lookupdialog" vdfWebObject="oVintner"
> vdfLookupTable="Vintners" vdfAttachedFields="wines__vintner"
> vdfLookupFields="vintners__name" />
>
> Now instead of using Wines.wo and adding the Vintner DDO and DDO_Server
line
> for it, which would work but doesn't really sound like the right way to go
> as it's not actually related like you mentioned you see it will use
> Vitner.wo which has:
>
> Object oVintners_DD is a Vintners_DataDictionary
> End_Object
>
> Set Main_DD to oVintners_DD
>
> This way you can use a unrelated table to supply values for you.
>
> -Edwin
>
>
>
>
> "Bob Worsley" <bworsley@comcast.net> wrote in message
> news:04MpNgLpHHA.312@dacmail.dataaccess.com...
> > I've found that when using this new feature in my program, in the DD
where
> > I've got the lookup I have to set Set DDO_Server to the lookup file.
This
> > is a bit of a departure from the norm since the two files aren't really
> > related. You might want to mention this in the docs, it took me a
little
> > while to figure out what was causing all of the errors.
> > Bob
> >
> >
> >
>
>

Edwin van der Velden
8-Jun-2007, 06:27 AM
Sorry I haven't had time to take a look at it yet, can you tell me what the
DDO structures in your wo look like and what the <input> + lookupbutton code
looks like? Or if at all possible a sample application that reproduces the
problem would help a lot for trying to find out where it goes wrong in your
case. I have used unrelated lookups before and never seen the errors you
describe, of course it's possible some settings that wasn't tested can cause
errors.

-Edwin


"Bob Worsley" <bworsley@cox.net> wrote in message
news:NVdb7sbqHHA.1560@dacmail.dataaccess.com...
> Is there any update on this? It's a complete show stopper for me.
> Bob
>
> "Bob Worsley" <bworsley@comcast.net> wrote in message
> news:04MpNgLpHHA.312@dacmail.dataaccess.com...
>> I've found that when using this new feature in my program, in the DD
>> where
>> I've got the lookup I have to set Set DDO_Server to the lookup file.
>> This
>> is a bit of a departure from the norm since the two files aren't really
>> related. You might want to mention this in the docs, it took me a little
>> while to figure out what was causing all of the errors.
>> Bob
>>
>>
>>
>
>

Bob Worsley
8-Jun-2007, 06:54 AM
Is there any update on this? It's a complete show stopper for me.
Bob

"Bob Worsley" <bworsley@comcast.net> wrote in message
news:04MpNgLpHHA.312@dacmail.dataaccess.com...
> I've found that when using this new feature in my program, in the DD where
> I've got the lookup I have to set Set DDO_Server to the lookup file. This
> is a bit of a departure from the norm since the two files aren't really
> related. You might want to mention this in the docs, it took me a little
> while to figure out what was causing all of the errors.
> Bob
>
>
>

Bob Worsley
8-Jun-2007, 10:00 AM
And I could be doing something wrong. I'll see if I can set one up using
the order example.
Bob

"Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in message
news:fu7fz$bqHHA.6116@dacmail.dataaccess.com...
> Sorry I haven't had time to take a look at it yet, can you tell me what
the
> DDO structures in your wo look like and what the <input> + lookupbutton
code
> looks like? Or if at all possible a sample application that reproduces the
> problem would help a lot for trying to find out where it goes wrong in
your
> case. I have used unrelated lookups before and never seen the errors you
> describe, of course it's possible some settings that wasn't tested can
cause
> errors.
>
> -Edwin
>
>
> "Bob Worsley" <bworsley@cox.net> wrote in message
> news:NVdb7sbqHHA.1560@dacmail.dataaccess.com...
> > Is there any update on this? It's a complete show stopper for me.
> > Bob
> >
> > "Bob Worsley" <bworsley@comcast.net> wrote in message
> > news:04MpNgLpHHA.312@dacmail.dataaccess.com...
> >> I've found that when using this new feature in my program, in the DD
> >> where
> >> I've got the lookup I have to set Set DDO_Server to the lookup file.
> >> This
> >> is a bit of a departure from the norm since the two files aren't really
> >> related. You might want to mention this in the docs, it took me a
little
> >> while to figure out what was causing all of the errors.
> >> Bob
> >>
> >>
> >>
> >
> >
>
>
>

Bob Worsley
8-Jun-2007, 02:01 PM
Edwin, I've made a small change to the order entry example to create a
non-related lookup. The attached zip - drop the dd & fd in the ddsrc, asp in
appHtml and the rest in data, and away you go. No recompile necessary.

I simply added a "SalesPerson" field to the customer file and made
appropriate changes to the .asp page. You will see an immediate error upon
entering the customer screen which is caused by the salesp hidden field.

I'm sure you will quickly tell me what I'm doing wrong. TIA...
Bob


"Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in message
news:fu7fz$bqHHA.6116@dacmail.dataaccess.com...
> Sorry I haven't had time to take a look at it yet, can you tell me what
the
> DDO structures in your wo look like and what the <input> + lookupbutton
code
> looks like? Or if at all possible a sample application that reproduces the
> problem would help a lot for trying to find out where it goes wrong in
your
> case. I have used unrelated lookups before and never seen the errors you
> describe, of course it's possible some settings that wasn't tested can
cause
> errors.
>
> -Edwin
>
>
> "Bob Worsley" <bworsley@cox.net> wrote in message
> news:NVdb7sbqHHA.1560@dacmail.dataaccess.com...
> > Is there any update on this? It's a complete show stopper for me.
> > Bob
> >
> > "Bob Worsley" <bworsley@comcast.net> wrote in message
> > news:04MpNgLpHHA.312@dacmail.dataaccess.com...
> >> I've found that when using this new feature in my program, in the DD
> >> where
> >> I've got the lookup I have to set Set DDO_Server to the lookup file.
> >> This
> >> is a bit of a departure from the norm since the two files aren't really
> >> related. You might want to mention this in the docs, it took me a
little
> >> while to figure out what was causing all of the errors.
> >> Bob
> >>
> >>
> >>
> >
> >
>
>
>

Edwin van der Velden
9-Jun-2007, 03:27 AM
Ok it looks like you should simply leave out the hidden salesp rowid and the
lookup + selection should work.You don't need the rowid value to do
finds/etc since it will do does on the customer table, the actual value for
the salesp name it should display there is also in the customer table, the
lookup will just find all records and display those so there's no rowid
value needed for that.

One thing the lookup does not do is select the value you have in your input
in the lookup.I'm not sure if that;s something I can easily fix as the value
in the input is the only information you have and the value might even be
something that doesn't exist in the lookup columns, but I will note it down
as a bug and see if we can do sometihng about that.

-Edwin


"Bob Worsley" <bworsley@comcast.net> wrote in message
news:yoQ0z8fqHHA.3152@dacmail.dataaccess.com...
> Edwin, I've made a small change to the order entry example to create a
> non-related lookup. The attached zip - drop the dd & fd in the ddsrc, asp
> in
> appHtml and the rest in data, and away you go. No recompile necessary.
>
> I simply added a "SalesPerson" field to the customer file and made
> appropriate changes to the .asp page. You will see an immediate error
> upon
> entering the customer screen which is caused by the salesp hidden field.
>
> I'm sure you will quickly tell me what I'm doing wrong. TIA...
> Bob
>
>
> "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> message
> news:fu7fz$bqHHA.6116@dacmail.dataaccess.com...
>> Sorry I haven't had time to take a look at it yet, can you tell me what
> the
>> DDO structures in your wo look like and what the <input> + lookupbutton
> code
>> looks like? Or if at all possible a sample application that reproduces
>> the
>> problem would help a lot for trying to find out where it goes wrong in
> your
>> case. I have used unrelated lookups before and never seen the errors you
>> describe, of course it's possible some settings that wasn't tested can
> cause
>> errors.
>>
>> -Edwin
>>
>>
>> "Bob Worsley" <bworsley@cox.net> wrote in message
>> news:NVdb7sbqHHA.1560@dacmail.dataaccess.com...
>> > Is there any update on this? It's a complete show stopper for me.
>> > Bob
>> >
>> > "Bob Worsley" <bworsley@comcast.net> wrote in message
>> > news:04MpNgLpHHA.312@dacmail.dataaccess.com...
>> >> I've found that when using this new feature in my program, in the DD
>> >> where
>> >> I've got the lookup I have to set Set DDO_Server to the lookup file.
>> >> This
>> >> is a bit of a departure from the norm since the two files aren't
>> >> really
>> >> related. You might want to mention this in the docs, it took me a
> little
>> >> while to figure out what was causing all of the errors.
>> >> Bob
>> >>
>> >>
>> >>
>> >
>> >
>>
>>
>>
>
>
>

Bob Worsley
9-Jun-2007, 07:48 AM
I added the rowid as an afterthought and it made no difference other than to
provide the error, so removing that makes sense.

I also saw the problem of the list not selecting, so once we're past that we
should be good.

If you hadn't seen this selection bug before, then how are your unrelated
lookups different than this one? Just wondering what I'm doing
differently...
Bob

"Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in message
news:zzcvCAnqHHA.3152@dacmail.dataaccess.com...
> Ok it looks like you should simply leave out the hidden salesp rowid and
the
> lookup + selection should work.You don't need the rowid value to do
> finds/etc since it will do does on the customer table, the actual value
for
> the salesp name it should display there is also in the customer table, the
> lookup will just find all records and display those so there's no rowid
> value needed for that.
>
> One thing the lookup does not do is select the value you have in your
input
> in the lookup.I'm not sure if that;s something I can easily fix as the
value
> in the input is the only information you have and the value might even be
> something that doesn't exist in the lookup columns, but I will note it
down
> as a bug and see if we can do sometihng about that.
>
> -Edwin
>
>
> "Bob Worsley" <bworsley@comcast.net> wrote in message
> news:yoQ0z8fqHHA.3152@dacmail.dataaccess.com...
> > Edwin, I've made a small change to the order entry example to create a
> > non-related lookup. The attached zip - drop the dd & fd in the ddsrc,
asp
> > in
> > appHtml and the rest in data, and away you go. No recompile necessary.
> >
> > I simply added a "SalesPerson" field to the customer file and made
> > appropriate changes to the .asp page. You will see an immediate error
> > upon
> > entering the customer screen which is caused by the salesp hidden field.
> >
> > I'm sure you will quickly tell me what I'm doing wrong. TIA...
> > Bob
> >
> >
> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> > message
> > news:fu7fz$bqHHA.6116@dacmail.dataaccess.com...
> >> Sorry I haven't had time to take a look at it yet, can you tell me what
> > the
> >> DDO structures in your wo look like and what the <input> + lookupbutton
> > code
> >> looks like? Or if at all possible a sample application that reproduces
> >> the
> >> problem would help a lot for trying to find out where it goes wrong in
> > your
> >> case. I have used unrelated lookups before and never seen the errors
you
> >> describe, of course it's possible some settings that wasn't tested can
> > cause
> >> errors.
> >>
> >> -Edwin
> >>
> >>
> >> "Bob Worsley" <bworsley@cox.net> wrote in message
> >> news:NVdb7sbqHHA.1560@dacmail.dataaccess.com...
> >> > Is there any update on this? It's a complete show stopper for me.
> >> > Bob
> >> >
> >> > "Bob Worsley" <bworsley@comcast.net> wrote in message
> >> > news:04MpNgLpHHA.312@dacmail.dataaccess.com...
> >> >> I've found that when using this new feature in my program, in the DD
> >> >> where
> >> >> I've got the lookup I have to set Set DDO_Server to the lookup file.
> >> >> This
> >> >> is a bit of a departure from the norm since the two files aren't
> >> >> really
> >> >> related. You might want to mention this in the docs, it took me a
> > little
> >> >> while to figure out what was causing all of the errors.
> >> >> Bob
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >>
> >
> >
> >
>
>
>

Edwin van der Velden
12-Jun-2007, 02:09 AM
Well, the lookup basically works, you can display the lookup and select a
record. The only thing not working is the value of the input field being
pre-selected in the lookup. I'm not sure if we should want to implement this
feature, since it would mean taking the input value and compare it to every
value of the correct column in the lookup table and even if the value is the
same there's no garantuee that's the actual record used to select that
value.

So unless we're talking past eachother and are talking about different kind
of selections the lookup is working except for the pre-selection thing?

-Edwin

"Bob Worsley" <bworsley@comcast.net> wrote in message
news:U5LxJRpqHHA.1556@dacmail.dataaccess.com...
>I added the rowid as an afterthought and it made no difference other than
>to
> provide the error, so removing that makes sense.
>
> I also saw the problem of the list not selecting, so once we're past that
> we
> should be good.
>
> If you hadn't seen this selection bug before, then how are your unrelated
> lookups different than this one? Just wondering what I'm doing
> differently...
> Bob
>
> "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> message
> news:zzcvCAnqHHA.3152@dacmail.dataaccess.com...
>> Ok it looks like you should simply leave out the hidden salesp rowid and
> the
>> lookup + selection should work.You don't need the rowid value to do
>> finds/etc since it will do does on the customer table, the actual value
> for
>> the salesp name it should display there is also in the customer table,
>> the
>> lookup will just find all records and display those so there's no rowid
>> value needed for that.
>>
>> One thing the lookup does not do is select the value you have in your
> input
>> in the lookup.I'm not sure if that;s something I can easily fix as the
> value
>> in the input is the only information you have and the value might even be
>> something that doesn't exist in the lookup columns, but I will note it
> down
>> as a bug and see if we can do sometihng about that.
>>
>> -Edwin
>>
>>
>> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> news:yoQ0z8fqHHA.3152@dacmail.dataaccess.com...
>> > Edwin, I've made a small change to the order entry example to create a
>> > non-related lookup. The attached zip - drop the dd & fd in the ddsrc,
> asp
>> > in
>> > appHtml and the rest in data, and away you go. No recompile necessary.
>> >
>> > I simply added a "SalesPerson" field to the customer file and made
>> > appropriate changes to the .asp page. You will see an immediate error
>> > upon
>> > entering the customer screen which is caused by the salesp hidden
>> > field.
>> >
>> > I'm sure you will quickly tell me what I'm doing wrong. TIA...
>> > Bob
>> >
>> >
>> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
>> > message
>> > news:fu7fz$bqHHA.6116@dacmail.dataaccess.com...
>> >> Sorry I haven't had time to take a look at it yet, can you tell me
>> >> what
>> > the
>> >> DDO structures in your wo look like and what the <input> +
>> >> lookupbutton
>> > code
>> >> looks like? Or if at all possible a sample application that reproduces
>> >> the
>> >> problem would help a lot for trying to find out where it goes wrong in
>> > your
>> >> case. I have used unrelated lookups before and never seen the errors
> you
>> >> describe, of course it's possible some settings that wasn't tested can
>> > cause
>> >> errors.
>> >>
>> >> -Edwin
>> >>
>> >>
>> >> "Bob Worsley" <bworsley@cox.net> wrote in message
>> >> news:NVdb7sbqHHA.1560@dacmail.dataaccess.com...
>> >> > Is there any update on this? It's a complete show stopper for me.
>> >> > Bob
>> >> >
>> >> > "Bob Worsley" <bworsley@comcast.net> wrote in message
>> >> > news:04MpNgLpHHA.312@dacmail.dataaccess.com...
>> >> >> I've found that when using this new feature in my program, in the
>> >> >> DD
>> >> >> where
>> >> >> I've got the lookup I have to set Set DDO_Server to the lookup
>> >> >> file.
>> >> >> This
>> >> >> is a bit of a departure from the norm since the two files aren't
>> >> >> really
>> >> >> related. You might want to mention this in the docs, it took me a
>> > little
>> >> >> while to figure out what was causing all of the errors.
>> >> >> Bob
>> >> >>
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >
>> >
>> >
>>
>>
>>
>
>
>

Bob Worsley
12-Jun-2007, 07:54 AM
Edwin, I don't understand something. The order entry example that I sent
you does not work.

If you leave the hidden rowid field in there's an error when simply finding
customer records, but bringing up the list seems to work - it's populated.
If you remove the hidden rowid field, the lookup comes up, but with an
error, and the list is blank. The error I get is:
this.oVdfForm.getStatusField(this.sLookupTable + "__rowid") has no
properties

So I'm not sure what I'm missing such that you say it's working. I get
this behavior with the order entry example and also with my own application.

Can you please send me or post the customer.asp page that you have working?
And anything else that might be necessary...

As to the pre-selection, I see your point, it takes some thought.

Bob

"Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in message
news:4SIQcCMrHHA.4088@dacmail.dataaccess.com...
> Well, the lookup basically works, you can display the lookup and select a
> record. The only thing not working is the value of the input field being
> pre-selected in the lookup. I'm not sure if we should want to implement
this
> feature, since it would mean taking the input value and compare it to
every
> value of the correct column in the lookup table and even if the value is
the
> same there's no garantuee that's the actual record used to select that
> value.
>
> So unless we're talking past eachother and are talking about different
kind
> of selections the lookup is working except for the pre-selection thing?
>
> -Edwin
>
> "Bob Worsley" <bworsley@comcast.net> wrote in message
> news:U5LxJRpqHHA.1556@dacmail.dataaccess.com...
> >I added the rowid as an afterthought and it made no difference other than
> >to
> > provide the error, so removing that makes sense.
> >
> > I also saw the problem of the list not selecting, so once we're past
that
> > we
> > should be good.
> >
> > If you hadn't seen this selection bug before, then how are your
unrelated
> > lookups different than this one? Just wondering what I'm doing
> > differently...
> > Bob
> >
> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> > message
> > news:zzcvCAnqHHA.3152@dacmail.dataaccess.com...
> >> Ok it looks like you should simply leave out the hidden salesp rowid
and
> > the
> >> lookup + selection should work.You don't need the rowid value to do
> >> finds/etc since it will do does on the customer table, the actual value
> > for
> >> the salesp name it should display there is also in the customer table,
> >> the
> >> lookup will just find all records and display those so there's no rowid
> >> value needed for that.
> >>
> >> One thing the lookup does not do is select the value you have in your
> > input
> >> in the lookup.I'm not sure if that;s something I can easily fix as the
> > value
> >> in the input is the only information you have and the value might even
be
> >> something that doesn't exist in the lookup columns, but I will note it
> > down
> >> as a bug and see if we can do sometihng about that.
> >>
> >> -Edwin
> >>
> >>
> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
> >> news:yoQ0z8fqHHA.3152@dacmail.dataaccess.com...
> >> > Edwin, I've made a small change to the order entry example to create
a
> >> > non-related lookup. The attached zip - drop the dd & fd in the ddsrc,
> > asp
> >> > in
> >> > appHtml and the rest in data, and away you go. No recompile
necessary.
> >> >
> >> > I simply added a "SalesPerson" field to the customer file and made
> >> > appropriate changes to the .asp page. You will see an immediate
error
> >> > upon
> >> > entering the customer screen which is caused by the salesp hidden
> >> > field.
> >> >
> >> > I'm sure you will quickly tell me what I'm doing wrong. TIA...
> >> > Bob
> >> >
> >> >
> >> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> >> > message
> >> > news:fu7fz$bqHHA.6116@dacmail.dataaccess.com...
> >> >> Sorry I haven't had time to take a look at it yet, can you tell me
> >> >> what
> >> > the
> >> >> DDO structures in your wo look like and what the <input> +
> >> >> lookupbutton
> >> > code
> >> >> looks like? Or if at all possible a sample application that
reproduces
> >> >> the
> >> >> problem would help a lot for trying to find out where it goes wrong
in
> >> > your
> >> >> case. I have used unrelated lookups before and never seen the errors
> > you
> >> >> describe, of course it's possible some settings that wasn't tested
can
> >> > cause
> >> >> errors.
> >> >>
> >> >> -Edwin
> >> >>
> >> >>
> >> >> "Bob Worsley" <bworsley@cox.net> wrote in message
> >> >> news:NVdb7sbqHHA.1560@dacmail.dataaccess.com...
> >> >> > Is there any update on this? It's a complete show stopper for me.
> >> >> > Bob
> >> >> >
> >> >> > "Bob Worsley" <bworsley@comcast.net> wrote in message
> >> >> > news:04MpNgLpHHA.312@dacmail.dataaccess.com...
> >> >> >> I've found that when using this new feature in my program, in the
> >> >> >> DD
> >> >> >> where
> >> >> >> I've got the lookup I have to set Set DDO_Server to the lookup
> >> >> >> file.
> >> >> >> This
> >> >> >> is a bit of a departure from the norm since the two files aren't
> >> >> >> really
> >> >> >> related. You might want to mention this in the docs, it took me
a
> >> > little
> >> >> >> while to figure out what was causing all of the errors.
> >> >> >> Bob
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >
> >
> >
>
>
>

Edwin van der Velden
12-Jun-2007, 08:14 AM
My mistake you're right, I've been testing it with the development version
in which (VdfLookupDialog.js):

this.oVdfDialogForm.getStatusField(this.sLookupTab le +
'__rowid').setValue(this.oVdfForm.getStatusField(t his.sLookupTable +
'__rowid').getValue(), true);

has been changed into:

if(this.oVdfDialogForm.getStatusField(this.sLookup Table + '__rowid')
&& this.oVdfForm.getStatusField(this.sLookupTable + '__rowid')) {
this.oVdfDialogForm.getStatusField(this.sLookupTab le +
'__rowid').setValue(this.oVdfForm.getStatusField(t his.sLookupTable +
'__rowid').getValue(), true);
}

I should have tested it with 1.0 code of course, in which it indeed produces
the error as you describe. You can mannually change the code above as
described and in the next version this will be part of the changes as well
so overwriting it then won't cause any problems.

-Edwin

"Bob Worsley" <bworsley@comcast.net> wrote in message
news:7G9qkCPrHHA.1556@dacmail.dataaccess.com...
> Edwin, I don't understand something. The order entry example that I sent
> you does not work.
>
> If you leave the hidden rowid field in there's an error when simply
> finding
> customer records, but bringing up the list seems to work - it's populated.
> If you remove the hidden rowid field, the lookup comes up, but with an
> error, and the list is blank. The error I get is:
> this.oVdfForm.getStatusField(this.sLookupTable + "__rowid") has no
> properties
>
> So I'm not sure what I'm missing such that you say it's working. I get
> this behavior with the order entry example and also with my own
> application.
>
> Can you please send me or post the customer.asp page that you have
> working?
> And anything else that might be necessary...
>
> As to the pre-selection, I see your point, it takes some thought.
>
> Bob
>
> "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> message
> news:4SIQcCMrHHA.4088@dacmail.dataaccess.com...
>> Well, the lookup basically works, you can display the lookup and select a
>> record. The only thing not working is the value of the input field being
>> pre-selected in the lookup. I'm not sure if we should want to implement
> this
>> feature, since it would mean taking the input value and compare it to
> every
>> value of the correct column in the lookup table and even if the value is
> the
>> same there's no garantuee that's the actual record used to select that
>> value.
>>
>> So unless we're talking past eachother and are talking about different
> kind
>> of selections the lookup is working except for the pre-selection thing?
>>
>> -Edwin
>>
>> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> news:U5LxJRpqHHA.1556@dacmail.dataaccess.com...
>> >I added the rowid as an afterthought and it made no difference other
>> >than
>> >to
>> > provide the error, so removing that makes sense.
>> >
>> > I also saw the problem of the list not selecting, so once we're past
> that
>> > we
>> > should be good.
>> >
>> > If you hadn't seen this selection bug before, then how are your
> unrelated
>> > lookups different than this one? Just wondering what I'm doing
>> > differently...
>> > Bob
>> >
>> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
>> > message
>> > news:zzcvCAnqHHA.3152@dacmail.dataaccess.com...
>> >> Ok it looks like you should simply leave out the hidden salesp rowid
> and
>> > the
>> >> lookup + selection should work.You don't need the rowid value to do
>> >> finds/etc since it will do does on the customer table, the actual
>> >> value
>> > for
>> >> the salesp name it should display there is also in the customer table,
>> >> the
>> >> lookup will just find all records and display those so there's no
>> >> rowid
>> >> value needed for that.
>> >>
>> >> One thing the lookup does not do is select the value you have in your
>> > input
>> >> in the lookup.I'm not sure if that;s something I can easily fix as the
>> > value
>> >> in the input is the only information you have and the value might even
> be
>> >> something that doesn't exist in the lookup columns, but I will note it
>> > down
>> >> as a bug and see if we can do sometihng about that.
>> >>
>> >> -Edwin
>> >>
>> >>
>> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
>> >> news:yoQ0z8fqHHA.3152@dacmail.dataaccess.com...
>> >> > Edwin, I've made a small change to the order entry example to create
> a
>> >> > non-related lookup. The attached zip - drop the dd & fd in the
>> >> > ddsrc,
>> > asp
>> >> > in
>> >> > appHtml and the rest in data, and away you go. No recompile
> necessary.
>> >> >
>> >> > I simply added a "SalesPerson" field to the customer file and made
>> >> > appropriate changes to the .asp page. You will see an immediate
> error
>> >> > upon
>> >> > entering the customer screen which is caused by the salesp hidden
>> >> > field.
>> >> >
>> >> > I'm sure you will quickly tell me what I'm doing wrong. TIA...
>> >> > Bob
>> >> >
>> >> >
>> >> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
>> >> > message
>> >> > news:fu7fz$bqHHA.6116@dacmail.dataaccess.com...
>> >> >> Sorry I haven't had time to take a look at it yet, can you tell me
>> >> >> what
>> >> > the
>> >> >> DDO structures in your wo look like and what the <input> +
>> >> >> lookupbutton
>> >> > code
>> >> >> looks like? Or if at all possible a sample application that
> reproduces
>> >> >> the
>> >> >> problem would help a lot for trying to find out where it goes wrong
> in
>> >> > your
>> >> >> case. I have used unrelated lookups before and never seen the
>> >> >> errors
>> > you
>> >> >> describe, of course it's possible some settings that wasn't tested
> can
>> >> > cause
>> >> >> errors.
>> >> >>
>> >> >> -Edwin
>> >> >>
>> >> >>
>> >> >> "Bob Worsley" <bworsley@cox.net> wrote in message
>> >> >> news:NVdb7sbqHHA.1560@dacmail.dataaccess.com...
>> >> >> > Is there any update on this? It's a complete show stopper for
>> >> >> > me.
>> >> >> > Bob
>> >> >> >
>> >> >> > "Bob Worsley" <bworsley@comcast.net> wrote in message
>> >> >> > news:04MpNgLpHHA.312@dacmail.dataaccess.com...
>> >> >> >> I've found that when using this new feature in my program, in
>> >> >> >> the
>> >> >> >> DD
>> >> >> >> where
>> >> >> >> I've got the lookup I have to set Set DDO_Server to the lookup
>> >> >> >> file.
>> >> >> >> This
>> >> >> >> is a bit of a departure from the norm since the two files aren't
>> >> >> >> really
>> >> >> >> related. You might want to mention this in the docs, it took me
> a
>> >> > little
>> >> >> >> while to figure out what was causing all of the errors.
>> >> >> >> Bob
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >
>> >
>> >
>>
>>
>>
>
>
>

Bob Worsley
12-Jun-2007, 08:55 AM
Whew! I thought I was going crazy. This fix now works, many thanks!

I'm sure the lack of a pre-selected value will have the users complaining,
but I can see the problem.
Bob

"Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in message
news:88MDWOPrHHA.3840@dacmail.dataaccess.com...
> My mistake you're right, I've been testing it with the development version
> in which (VdfLookupDialog.js):
>
> this.oVdfDialogForm.getStatusField(this.sLookupTab le +
> '__rowid').setValue(this.oVdfForm.getStatusField(t his.sLookupTable +
> '__rowid').getValue(), true);
>
> has been changed into:
>
> if(this.oVdfDialogForm.getStatusField(this.sLookup Table +
'__rowid')
> && this.oVdfForm.getStatusField(this.sLookupTable + '__rowid')) {
> this.oVdfDialogForm.getStatusField(this.sLookupTab le +
> '__rowid').setValue(this.oVdfForm.getStatusField(t his.sLookupTable +
> '__rowid').getValue(), true);
> }
>
> I should have tested it with 1.0 code of course, in which it indeed
produces
> the error as you describe. You can mannually change the code above as
> described and in the next version this will be part of the changes as well
> so overwriting it then won't cause any problems.
>
> -Edwin
>
> "Bob Worsley" <bworsley@comcast.net> wrote in message
> news:7G9qkCPrHHA.1556@dacmail.dataaccess.com...
> > Edwin, I don't understand something. The order entry example that I
sent
> > you does not work.
> >
> > If you leave the hidden rowid field in there's an error when simply
> > finding
> > customer records, but bringing up the list seems to work - it's
populated.
> > If you remove the hidden rowid field, the lookup comes up, but with an
> > error, and the list is blank. The error I get is:
> > this.oVdfForm.getStatusField(this.sLookupTable + "__rowid") has no
> > properties
> >
> > So I'm not sure what I'm missing such that you say it's working. I get
> > this behavior with the order entry example and also with my own
> > application.
> >
> > Can you please send me or post the customer.asp page that you have
> > working?
> > And anything else that might be necessary...
> >
> > As to the pre-selection, I see your point, it takes some thought.
> >
> > Bob
> >
> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> > message
> > news:4SIQcCMrHHA.4088@dacmail.dataaccess.com...
> >> Well, the lookup basically works, you can display the lookup and select
a
> >> record. The only thing not working is the value of the input field
being
> >> pre-selected in the lookup. I'm not sure if we should want to implement
> > this
> >> feature, since it would mean taking the input value and compare it to
> > every
> >> value of the correct column in the lookup table and even if the value
is
> > the
> >> same there's no garantuee that's the actual record used to select that
> >> value.
> >>
> >> So unless we're talking past eachother and are talking about different
> > kind
> >> of selections the lookup is working except for the pre-selection thing?
> >>
> >> -Edwin
> >>
> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
> >> news:U5LxJRpqHHA.1556@dacmail.dataaccess.com...
> >> >I added the rowid as an afterthought and it made no difference other
> >> >than
> >> >to
> >> > provide the error, so removing that makes sense.
> >> >
> >> > I also saw the problem of the list not selecting, so once we're past
> > that
> >> > we
> >> > should be good.
> >> >
> >> > If you hadn't seen this selection bug before, then how are your
> > unrelated
> >> > lookups different than this one? Just wondering what I'm doing
> >> > differently...
> >> > Bob
> >> >
> >> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote in
> >> > message
> >> > news:zzcvCAnqHHA.3152@dacmail.dataaccess.com...
> >> >> Ok it looks like you should simply leave out the hidden salesp rowid
> > and
> >> > the
> >> >> lookup + selection should work.You don't need the rowid value to do
> >> >> finds/etc since it will do does on the customer table, the actual
> >> >> value
> >> > for
> >> >> the salesp name it should display there is also in the customer
table,
> >> >> the
> >> >> lookup will just find all records and display those so there's no
> >> >> rowid
> >> >> value needed for that.
> >> >>
> >> >> One thing the lookup does not do is select the value you have in
your
> >> > input
> >> >> in the lookup.I'm not sure if that;s something I can easily fix as
the
> >> > value
> >> >> in the input is the only information you have and the value might
even
> > be
> >> >> something that doesn't exist in the lookup columns, but I will note
it
> >> > down
> >> >> as a bug and see if we can do sometihng about that.
> >> >>
> >> >> -Edwin
> >> >>
> >> >>
> >> >> "Bob Worsley" <bworsley@comcast.net> wrote in message
> >> >> news:yoQ0z8fqHHA.3152@dacmail.dataaccess.com...
> >> >> > Edwin, I've made a small change to the order entry example to
create
> > a
> >> >> > non-related lookup. The attached zip - drop the dd & fd in the
> >> >> > ddsrc,
> >> > asp
> >> >> > in
> >> >> > appHtml and the rest in data, and away you go. No recompile
> > necessary.
> >> >> >
> >> >> > I simply added a "SalesPerson" field to the customer file and made
> >> >> > appropriate changes to the .asp page. You will see an immediate
> > error
> >> >> > upon
> >> >> > entering the customer screen which is caused by the salesp hidden
> >> >> > field.
> >> >> >
> >> >> > I'm sure you will quickly tell me what I'm doing wrong. TIA...
> >> >> > Bob
> >> >> >
> >> >> >
> >> >> > "Edwin van der Velden" <edwin.van.der.velden@dataaccess.nl> wrote
in
> >> >> > message
> >> >> > news:fu7fz$bqHHA.6116@dacmail.dataaccess.com...
> >> >> >> Sorry I haven't had time to take a look at it yet, can you tell
me
> >> >> >> what
> >> >> > the
> >> >> >> DDO structures in your wo look like and what the <input> +
> >> >> >> lookupbutton
> >> >> > code
> >> >> >> looks like? Or if at all possible a sample application that
> > reproduces
> >> >> >> the
> >> >> >> problem would help a lot for trying to find out where it goes
wrong
> > in
> >> >> > your
> >> >> >> case. I have used unrelated lookups before and never seen the
> >> >> >> errors
> >> > you
> >> >> >> describe, of course it's possible some settings that wasn't
tested
> > can
> >> >> > cause
> >> >> >> errors.
> >> >> >>
> >> >> >> -Edwin
> >> >> >>
> >> >> >>
> >> >> >> "Bob Worsley" <bworsley@cox.net> wrote in message
> >> >> >> news:NVdb7sbqHHA.1560@dacmail.dataaccess.com...
> >> >> >> > Is there any update on this? It's a complete show stopper for
> >> >> >> > me.
> >> >> >> > Bob
> >> >> >> >
> >> >> >> > "Bob Worsley" <bworsley@comcast.net> wrote in message
> >> >> >> > news:04MpNgLpHHA.312@dacmail.dataaccess.com...
> >> >> >> >> I've found that when using this new feature in my program, in
> >> >> >> >> the
> >> >> >> >> DD
> >> >> >> >> where
> >> >> >> >> I've got the lookup I have to set Set DDO_Server to the lookup
> >> >> >> >> file.
> >> >> >> >> This
> >> >> >> >> is a bit of a departure from the norm since the two files
aren't
> >> >> >> >> really
> >> >> >> >> related. You might want to mention this in the docs, it took
me
> > a
> >> >> > little
> >> >> >> >> while to figure out what was causing all of the errors.
> >> >> >> >> Bob
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >
> >
> >
>
>
>