Hi,
I'm trying to update a field on a form depending on the value selected in a lookup.
I've put a PHP function in the Lookup Tab and call this function to update an object in the "Update Other fields" Subform.
Using the lookup form via the button, it works :
My field named "Référent" is updated.
But using the autocomplete, nothing appears :
Is there something more to do or is this a bug ?
Thanks for your answers.
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Update Other Fields and Autocomplete
-
- Posts: 11
- Joined: Sun May 11, 2014 9:18 am
- Location: France
Update Other Fields and Autocomplete
You do not have the required permissions to view the files attached to this post.
-
- Posts: 11
- Joined: Sun May 11, 2014 9:18 am
- Location: France
Re: Update Other Fields and Autocomplete
Solved !
The Lookup Form does a lookup with the id, in my case 'ele_id' so the WHERE condition "WHERE ele_id = '#RECORD_ID#'" returns a value.
But the autocomplete feature is using code for the lookup so you need to add a condition to the WHERE clause.
In my case, replacing "WHERE ele_id = '#RECORD_ID#'" by "WHERE ele_id = '#RECORD_ID#' OR CONCAT_WS(' ',ele_nom,ele_prenom) = '#RECORD_ID#'" make it works !
Not very intuitive
The Lookup Form does a lookup with the id, in my case 'ele_id' so the WHERE condition "WHERE ele_id = '#RECORD_ID#'" returns a value.
But the autocomplete feature is using code for the lookup so you need to add a condition to the WHERE clause.
In my case, replacing "WHERE ele_id = '#RECORD_ID#'" by "WHERE ele_id = '#RECORD_ID#' OR CONCAT_WS(' ',ele_nom,ele_prenom) = '#RECORD_ID#'" make it works !
Not very intuitive
