You are viewing limited content. For full access, please sign in.

Question

Question

Completar campos en forms con base de datos

asked on June 2, 2015

Hola, me podrían ayudar estoy haciendo un formulario y me han solicitado que los campos de los nombres de los gerentes se completen de forma automática con información de una base de datos.

La idea es que si el usuario selecciona en el formulario el país que le corresponda, ejemplo Costa Rica, los campos de los nombres de los gerentes se completen de forma automática con el nombre del personal actual.

Lo intente hacer con los campos de búsqueda pero lo que hace es colocarme en el campo todos los nombres de los usuarios para que los busquen de forma manual.

Les adjunto unas imágenes.

Gracias por la ayuda.

Saludos.

Forms.jpg
Puesto Puesto en BD.jpg
Campo a completar.jpg
Forms.jpg (97.18 KB)
0 0

Replies

replied on June 9, 2015

Hola Madison,

 

Muchas gracias por la ayuda, voy a probar la configuración que me indicaste.

 

Saludos.

2 0
replied on June 9, 2015

 

Hi Andres,
 
It’s definitely possible to get this working, and it looks like the issue lies in your Lookup Rules. From the pictures you provided, it doesn't looks like a "legalEntityName" column exists in your FO_Employees table.  This could by why your lookup isn't working as intended.  Make sure you've updated Forms with the newest version of your database by clicking on the gear icon in the top right hand corner, and then selecting the "Refresh" button under the "Data Sources" tab:
 
 
 
If refreshing doesn’t solve this issue, I recommend taking a look at the following example of a successful Lookup Rule.  This form below finds the first name of an employee based on the country name the user selects:

The lookup rule below will look at what country the user selected, and then check to see what employee name is listed with that country in the FO_Employees table.

 
  
It’s important to note that the data source columns “country” and “firstname” are both listed in the FO_Employees table, as seen below.

 

 
 
This is key to getting your lookup to work as intended.  It’s also worth noting that if two people had the same country (John and Jane both have Costa Rica), then my lookup rule would be trying to return multiple people in the name field.  This may be why you were getting an issue, and therefore it would be best to refine your lookup to be more specific to an individual employee.

I hope this helps, and check out our Lookup Rules help files for a detailed look at populating fields from a database.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.