help! default value for lookup

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
mdannatt
Veteran Member
Posts: 41
Joined: 2020-01-27 17:34

help! default value for lookup

Post by mdannatt » 2022-10-30 08:53

i am absolutely out of ideas and hoping someone can help me.
Using appgini 22.14. I have a table with several drop downs, whuch are lookups on other tables. To save time, I set the default value to the most common answer, which is used 90% of the time. Suddenly, these default entries are nowhere to be seen. Not only that, marking the field as 'required' makes no difference to my ability to save a new record without completing the required field.
Console shows no errors
I have reuploaded the files
I have uploaded files to a mirror site with same results
I have reinstalled appgini

I really have no clue what is going on here and would appreciate any ideas, or even a workaround to set a default entry.
Roses are red, Violets are blue, unexpected '}' on line 32

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: help! default value for lookup

Post by onoehring » 2022-10-30 19:34

Hi,

maybe you could also post a screenshot? This could help.

Some suggestions:
Did the primary key of your default change?
Did you put in (are you still putting in) the correct "value": If your lookup shows a text, you need to set that text as default in AG, not the primary key.
Did you try to clear your cache (JS)?

Olaf

mdannatt
Veteran Member
Posts: 41
Joined: 2020-01-27 17:34

Re: help! default value for lookup

Post by mdannatt » 2022-10-31 08:42

HI Olaf
I have tried:
Clearing cache
Changing browsers
Reinstalling Appgini (didn't delete old version, simply did a new install over old version)
Toggling the "required" field
Uploading to live site as well as my basic test mirror site (has no active plugins or javascript helper , etc)
Praying for divine or cosmic interventions
Sadly, none of the above worked.
The primary key hasn't changed
here are some screenshots:
Attachments
settings1.jpg
settings1.jpg (74.46 KiB) Viewed 1970 times
Screenshot4.jpg
Screenshot4.jpg (23.2 KiB) Viewed 1970 times
Screenshot3.jpg
Screenshot3.jpg (12.35 KiB) Viewed 1970 times
Screenshot2.jpg
Screenshot2.jpg (135.73 KiB) Viewed 1970 times
Roses are red, Violets are blue, unexpected '}' on line 32

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: help! default value for lookup

Post by onoehring » 2022-10-31 09:14

Hi,

maybe removing the "unsigned" from the PAIN field helps? I don't think my dropdowns have that option checked.
The primary key (PK) of the harris_pain table should probably be an integer autoincrement.
Might there be a space character (" ") after the default text? Or after the text in the harris_pain tabnle? Did you check this?
Oh, see there is a blue ! shown in your first image next to the "Parent caption field part 2" this means, you are not using the default AG SQL code. Are you pulling the primary key AND the response? Maybe you can check this and (also) post the SQL you are using to fill the drop down.
Tip: your field "harris_pain.response" should probable be mandatory (required) as well and also be unique.

Olaf

mdannatt
Veteran Member
Posts: 41
Joined: 2020-01-27 17:34

Re: help! default value for lookup

Post by mdannatt » 2022-10-31 11:55

maybe removing the "unsigned" from the PAIN field helps? I don't think my dropdowns have that option checked.
-Made no difference
The primary key (PK) of the harris_pain table should probably be an integer autoincrement.
COnfirm is is autoincrement
Might there be a space character (" ") after the default text? Or after the text in the harris_pain tabnle? Did you check this?
CHecked this twice
Oh, see there is a blue ! shown in your first image next to the "Parent caption field part 2" this means, you are not using the default AG SQL code. Are you pulling the primary key AND the response? Maybe you can check this and (also) post the SQL you are using to fill the drop down.
This was just to sort options by index number. I changed it bck to the default and it made no difference
Tip: your field "harris_pain.response" should probably be mandatory (required) as well and also be unique.
Changed these per your suggestion, no change

i will try and set up two completely new tables and see if that works
Roses are red, Violets are blue, unexpected '}' on line 32

mdannatt
Veteran Member
Posts: 41
Joined: 2020-01-27 17:34

Re: help! default value for lookup

Post by mdannatt » 2022-10-31 12:32

i also tried with to test tables, to rule out that the existing tables are corrupted in some way. they don't work either. :shock: :(
Roses are red, Violets are blue, unexpected '}' on line 32

mdannatt
Veteran Member
Posts: 41
Joined: 2020-01-27 17:34

Re: help! default value for lookup: SOLVED

Post by mdannatt » 2022-10-31 16:18

I have finally found the problem. There is a compatibility problem with 22.14 and PHP 8.0 . My service provider automatically "upgraded" me to 8.0. I rolled back to 7.4 and all the drop-down defaults are now back. I will post this in bugs as a compatibility issue. Thank you so much for taking the time to offer your suggestions.
Roses are red, Violets are blue, unexpected '}' on line 32

Post Reply