Auto-populate field with data from a database based on another field in the smartform

  • 27 October 2015
  • 1 reply
  • 9 views

Badge +1

I would like to know how to auto-populate a field with data from a database table based on another field in a smartform as its reference/lookup value. Can someone please help me? Thanks!


1 reply

Userlevel 1
Badge +8

Hi tonym

 

I am going to assume that you understand smartobjects, and that you have a smartobject to get data from your database table. 

 

To auto-populate a field with the database value, you can add a rule to the change event on your lookup value field. On this rule you can execute the read or list method (depending on whether the lookup value is the PK or not of the table) for your smartobject and pass in the lookup fields value in the input mapping. In the output mapping return the property you want to the field you want auto-populated.

Reply