Default value Lookup-Field
Default value Lookup-Field
Hi,
I have made for some fields Lookups.
For the specific field I've set the default value as "1" (the first record in the related table)
After generating the project and open the project in the browser and "Add " a new record I assumed to see the value of the first record from the related table.
However I see the text : No matches found
What do I do wrong?
Ron
I have made for some fields Lookups.
For the specific field I've set the default value as "1" (the first record in the related table)
After generating the project and open the project in the browser and "Add " a new record I assumed to see the value of the first record from the related table.
However I see the text : No matches found
What do I do wrong?
Ron
- Attachments
-
- Lookup-default.JPG (48.39 KiB) Viewed 2871 times
-
- Default_for_field_coach2.JPG (98.97 KiB) Viewed 2871 times
-
- Default_for_field_status1.JPG (70.76 KiB) Viewed 2871 times
Re: Default value Lookup-Field
Hi Ron,
are you sure you have the PK = 1 in the lookup tables (status and coach) set?
are you sure you have the PK = 1 in the lookup tables (status and coach) set?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Default value Lookup-Field
Hi,
Thank you for looking into my "Problem"
As you can see, attachments, I think I do the right things to get a "default" value whenever a new "Aanvragen-record" is made.
Ron
Thank you for looking into my "Problem"
As you can see, attachments, I think I do the right things to get a "default" value whenever a new "Aanvragen-record" is made.
Ron
- Attachments
-
- Table_Coach.JPG (160.68 KiB) Viewed 2833 times
-
- Lookup_coach.JPG (130.78 KiB) Viewed 2833 times
Re: Default value Lookup-Field
Hi Ron,
yes, but can you please check in your database if you have the record with the id=1 in the coach table available.
shall return 1, if not it will give you the number you need to put into the aanvragen.Coach1_ID default setting.
yes, but can you please check in your database if you have the record with the id=1 in the coach table available.
Code: Select all
select min(id) from coach
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Default value Lookup-Field
According to me it is all Okay, however now default shows up at a new record "aanvragen"
Ron
Ron
- Attachments
-
- All_rows_Tabel_Coach.JPG (60.64 KiB) Viewed 2814 times
-
- Select min(id).JPG (34.8 KiB) Viewed 2814 times
Re: Default value Lookup-Field
So all is good now, or is anything open?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Default value Lookup-Field
Sorry,
Same result as when I started this Post.
Adding a record the Picklist fields stil say:
no matches found
Ron
Same result as when I started this Post.
Adding a record the Picklist fields stil say:
no matches found
Ron
Re: Default value Lookup-Field
which version are you on?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Default value Lookup-Field
Version 22.14.
Problem occured also at 22.13
Problem occured also at 22.13
Re: Default value Lookup-Field
Hi Ron,
after looking deeper into this I think you need to specify the actual value including the separator of the lookup table (voornaam - achternaam), not the PK.
after looking deeper into this I think you need to specify the actual value including the separator of the lookup table (voornaam - achternaam), not the PK.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Default value Lookup-Field
Now I lost you.
In the lookup query I did specify Voornaam and Achternaam.
This value is to be seen whenever you click the picklist of the specified field.
I think that it is not possible to have the default value in, set in the database by .Id field ( in this case value 1) when one creates a new record.
.
In the lookup query I did specify Voornaam and Achternaam.
This value is to be seen whenever you click the picklist of the specified field.
I think that it is not possible to have the default value in, set in the database by .Id field ( in this case value 1) when one creates a new record.
.
Re: Default value Lookup-Field
sorry for not making this clear.
Put in the default value the display string of what you would select from the picklist. One comment, as shown in you extract the selection should be unique othewise it might be confusing.
Put in the default value the display string of what you would select from the picklist. One comment, as shown in you extract the selection should be unique othewise it might be confusing.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Default value Lookup-Field
Okay,
I still don't get it.
I've now made a variation of Look-up presentations.
In case of picklist "Coach-" It could be a long list displayed as a radio-button.
So therefore I would like to see, if possible text like "<pick one>" That should be p.a. ID number 1 in the table coches.
If I give the fields "Coaches-" an initial value of 1 (defined in the AppGini application and in the database table) nothing shows up by creation of a new record.
If I give the value "<pick one>" in both the table and AppGini field I get an error in the table, because the Coach_Id in the table "Aanvragen" is defined as an Integer.
I hope I can make my point clear, don't bother that much I'll the go on with the Picklist option that suits.
Ron
I still don't get it.
I've now made a variation of Look-up presentations.
In case of picklist "Coach-" It could be a long list displayed as a radio-button.
So therefore I would like to see, if possible text like "<pick one>" That should be p.a. ID number 1 in the table coches.
If I give the fields "Coaches-" an initial value of 1 (defined in the AppGini application and in the database table) nothing shows up by creation of a new record.
If I give the value "<pick one>" in both the table and AppGini field I get an error in the table, because the Coach_Id in the table "Aanvragen" is defined as an Integer.
I hope I can make my point clear, don't bother that much I'll the go on with the Picklist option that suits.
Ron
- Attachments
-
- Varius-Lookup.JPG (60.42 KiB) Viewed 2703 times
Re: Default value Lookup-Field
Hi,
so if I look at you list of Coaches, you may add
Mary-Doe
into the default setting of the aanvragen.Coach1_ID field.
so if I look at you list of Coaches, you may add
Mary-Doe
into the default setting of the aanvragen.Coach1_ID field.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Default value Lookup-Field
Hi,
I think we are still, I mean me, out off sync.
I like to see that, in this case, the value "Test voor enkele aanvraag"already is displayed in the fieldname.
Do you think this Is that possible?
ron
I think we are still, I mean me, out off sync.
I like to see that, in this case, the value "Test voor enkele aanvraag"already is displayed in the fieldname.
Do you think this Is that possible?
ron
Re: Default value Lookup-Field
Hi Ron,
it should work.
In case of
Test voor enkele aanvraag
it shoudd be
test-voor Enkele aanvraag
where test is the firstname and voor Enkele aanvraag the lastname.
You can use the combination in the default value that you put in the lookup, but rther the PK of the lookup table you need to put the result of the lookup in the defaut value.
it should work.
In case of
Test voor enkele aanvraag
it shoudd be
test-voor Enkele aanvraag
where test is the firstname and voor Enkele aanvraag the lastname.
You can use the combination in the default value that you put in the lookup, but rther the PK of the lookup table you need to put the result of the lookup in the defaut value.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Default value Lookup-Field
Hi,
I've done your suggestions, however .... no results.
Is there a "bug" in this release or.... Is it not possible want I want?
(After this try (see screenshots) I've place the defaultvalue back to 1 at field Coach-1)
I use: Version 22.14; Revision 1293
Ron
I've done your suggestions, however .... no results.
Is there a "bug" in this release or.... Is it not possible want I want?
(After this try (see screenshots) I've place the defaultvalue back to 1 at field Coach-1)
I use: Version 22.14; Revision 1293
Ron
- Attachments
-
- Lookup-default-02.JPG (157.17 KiB) Viewed 2556 times
-
- No-default-to-be-filled-out.JPG (39.63 KiB) Viewed 2556 times
Re: Default value Lookup-Field
Hi Ron,
if I see it correctly in the screenshot, you have spaces in the default value. Try
test-voor Enkele aanvraag
instead of
test - voor Enkele aanvraag
It needs to be the exact text that appears in the dropdown.
if I see it correctly in the screenshot, you have spaces in the default value. Try
test-voor Enkele aanvraag
instead of
test - voor Enkele aanvraag
It needs to be the exact text that appears in the dropdown.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Default value Lookup-Field
Hi pböttcher
I'm a happy camper
It listens very careful as I now understand
Thank you being so patient with ne, great!
Ron
I'm a happy camper
It listens very careful as I now understand
Thank you being so patient with ne, great!
Ron