Hi,
I have followed the steps on the youtube vid to configure the default values in an edit form Lookup.
I.E.
Subform's "Default Filter for Browse Screen" => #ClientID#
Subform's filtering works perfectly.
Click "Add Record" button...
When I set Default Value SQL for a Lookup to "select '#browse_filter#' ", I get the value=0, even though the value should be 2127827375.
I set the Default Value SQL for a Text Box to "select '#browse_filter#'" and I get out "#browse_filter#".
I have fought with this for about a day and I am at my wits end. I am obviously missing something stupid.
Help please?
Matt.
Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
"Add Record" from SubForm and populating field
-
- Posts: 23
- Joined: Tue Nov 27, 2012 7:31 am
-
- Posts: 503
- Joined: Thu May 24, 2012 2:08 am
- Location: Milan, Italy
- Contact:
Re: "Add Record" from SubForm and populating field
fester,
maybe something wrong in subform and/or lookup field settings.
Can you post some screenshots?
Max
maybe something wrong in subform and/or lookup field settings.
Can you post some screenshots?
Max
-
- Posts: 23
- Joined: Tue Nov 27, 2012 7:31 am
Re: "Add Record" from SubForm and populating field
Subform
The subform exists on the (Wizard) ClientTable form.
Lookup
The subform exists on the (Wizard) ClientTable form.
-
- Posts: 503
- Joined: Thu May 24, 2012 2:08 am
- Location: Milan, Italy
- Contact:
Re: "Add Record" from SubForm and populating field
fester,
the few settings you show seems correct.
Try to check the value set in Lookup object -> Field Name field: this is the FK (in the subform QualificationsTable2) that point to PK in ClientTable table.
the few settings you show seems correct.
Try to check the value set in Lookup object -> Field Name field: this is the FK (in the subform QualificationsTable2) that point to PK in ClientTable table.
-
- Posts: 23
- Joined: Tue Nov 27, 2012 7:31 am
Re: "Add Record" from SubForm and populating field
The Lookup Object
Client Form
Subform
Anything else you would like to see?-
- Posts: 503
- Joined: Thu May 24, 2012 2:08 am
- Location: Milan, Italy
- Contact:
Re: "Add Record" from SubForm and populating field
fester,
I think the problem could be in a wrong configuration of the Lookup object: in lookup object -> All tab -> Code Field you should insert the name of a real ClientTable field (have a look at this post).
I think the problem could be in a wrong configuration of the Lookup object: in lookup object -> All tab -> Code Field you should insert the name of a real ClientTable field (have a look at this post).
-
- Posts: 23
- Joined: Tue Nov 27, 2012 7:31 am
Re: "Add Record" from SubForm and populating field
I have the All - Field Name and the Lookup - Code Field set to the ID of the table.
The ID field is an autoincrementing int - will that possibly be the issue?
The ID field is an autoincrementing int - will that possibly be the issue?
-
- Posts: 23
- Joined: Tue Nov 27, 2012 7:31 am
Re: "Add Record" from SubForm and populating field
Viewing a value from the subform i get
<input name='ClientID' id='ClientID' type='hidden' value='2127827375'>
However on the Add Record button press I get
<input name='ClientID' id='ClientID' type='hidden' value='0'>
I am missing something in bringing the FK from the subform to the popup Add Record form. I just can't work out what.
<input name='ClientID' id='ClientID' type='hidden' value='2127827375'>
However on the Add Record button press I get
<input name='ClientID' id='ClientID' type='hidden' value='0'>
I am missing something in bringing the FK from the subform to the popup Add Record form. I just can't work out what.
-
- Posts: 503
- Joined: Thu May 24, 2012 2:08 am
- Location: Milan, Italy
- Contact:
Re: "Add Record" from SubForm and populating field
fester,
The Field Name in the lookup object is the name of the field where the value of the lookup has to be saved; make sure that this FK is the same size and type as the PK of the lookup table.
have a look at this wiki.fester wrote:The ID field is an autoincrementing int - will that possibly be the issue?
The Field Name in the lookup object is the name of the field where the value of the lookup has to be saved; make sure that this FK is the same size and type as the PK of the lookup table.
-
- Posts: 23
- Joined: Tue Nov 27, 2012 7:31 am
Re: "Add Record" from SubForm and populating field
The ClientTable PK and the QualificationsTable FK match, and are correct from a DB point of view.
I'm stumped.
I have spoken to customer and convinced them out of this requirement. Something silly is happening and I have burnt too much time fighting with it
I'm stumped.
I have spoken to customer and convinced them out of this requirement. Something silly is happening and I have burnt too much time fighting with it