This is something that used to work but no longer does.
Lets say table ‘products’ has 5 values with ID & Description
1 - Book
2 - Pen
3 - Pencil
4 - Paper
5 - Eraser
Create a new Search application.
Use the ID field as a ‘Select’ field with Automatic lookup, something like
SELECT ID, Description
FROM tbl_products
ORDER BY Description
I would like to set an initial default for this Select field.
IE, I want to default the dropdown to the value of “4”, which should show Paper in the dropdown.
In OnScriptInit, add code
{ID}=4;
In previous versions of scriptcase, this would work and when entering the Search page, the dropdown would be set to the default value. Now in my 9.10.0010 version, this no longer works.
I had upgraded to 9.10 from 9.6 last year when this was working fine. My customers are complaining and I have no solution for them to make this work again.
I reproduced the issue in a scriptcase samples database using tbl_assets