Page 1 of 1

Problem with Hash Cookie from Lookup is not recognised.

Posted: Sat Aug 16, 2025 4:48 am
by steven
Hi All.

I have a quote form that calculates stuff based on the company being quoted.

But the After Browse won't recognise the company_id ...



1. When using autocomplete before opening the Browse Form the company_id (sal_company_id)
2. Can't be used when caluculation a product's cost.
3. It looks for the company_id with a Hash Cookie.
4. But it leaves it blank.

It only happens when typing something into the code field and then using then opening the lookup's Browe Form.


autocomplete_problem.png






I have attached the problem db.


I appreciate any help.


Steven

Re: Problem with Hash Cookie from Lookup is not recognised.

Posted: Sat Aug 16, 2025 7:13 am
by kev1n
Hi Steven,

When opening the form MMAD, I’m getting SQL errors because the table #1146 – Table 'ship_status' doesn’t exist.

And could you let me know which form / form code is actually causing the error you mentioned above?

Kev

Re: Problem with Hash Cookie from Lookup is not recognised.

Posted: Sat Aug 16, 2025 11:27 am
by steven
Thanks Kev,

maybe its missing this...

Code: Select all

DROP TABLE IF EXISTS `ship_status`;

CREATE VIEW `ship_status`  AS SELECT `ship`.`ship_id` AS `ship_status_id`, if(`ship`.`shp_printed` is null,'not_printed' collate utf8mb4_unicode_ci,'' collate utf8mb4_unicode_ci) AS `sta_printed`, if(`ship`.`shp_invoiced` is null,'not_invoiced' collate utf8mb4_unicode_ci,'' collate utf8mb4_unicode_ci) AS `sta_invoiced`, if(`ship`.`shp_delivered` is null,'not_delivered' collate utf8mb4_unicode_ci,'' collate utf8mb4_unicode_ci) AS `sta_delivered`, if(`ship`.`shp_shipped` is null,'not_shipped' collate utf8mb4_unicode_ci,'' collate utf8mb4_unicode_ci) AS `sta_shipped` FROM `ship` ;

But I've added the db again.





The problem is with the Q - Quote Form and QSF - the subform Lookup Object.

Hopefully this makes sense.


Steven

Re: Problem with Hash Cookie from Lookup is not recognised.

Posted: Sat Aug 16, 2025 12:00 pm
by kev1n
I wasn’t able to reproduce the behavior you described.
To illustrate, I’ve attached a short video showing the steps I took.

However, I did notice that the database version is from 2024.
It’s therefore quite possible that the issue only occurs with older versions (I have used the most recent one to test it)



Re: Problem with Hash Cookie from Lookup is not recognised.

Posted: Sat Aug 16, 2025 1:05 pm
by steven
Thanks, I should have made a video to explain it better.

Rather than using the magnifying glass, try

1. typing COP in the code field.
2. tabbing out of the field (this will open up a lookup, filtered with items that match COP).
3. Select COPLEY CO. from this lookup.

Now the Subform's Lookup can't use #sal_company_id#.


(Its weird)

Steven

Re: Problem with Hash Cookie from Lookup is not recognised.

Posted: Sat Aug 16, 2025 1:14 pm
by kev1n
That's exactly what I did in the 3rd row. I didn't click on the magnifying glass but used the tab.

Re: Problem with Hash Cookie from Lookup is not recognised.

Posted: Sat Aug 16, 2025 1:43 pm
by steven
Kev,

I found it only happens when creating a new Quote.

If you reload a quote the sal_company_id is in the Hash Cookies, but it doesn't go in the Hash Cookies, if you are creating a quote for the first time.


Steven

Re: Problem with Hash Cookie from Lookup is not recognised.

Posted: Sat Aug 16, 2025 2:01 pm
by kev1n
In my video, I also created a new record. But the hash cookie was still resolved.