Expand my Community achievements bar.

database lookup and field value assignment

Avatar

Level 1

I have LC ES4 trial version trying to evaluate it.  i have a data connection set up called Entity with a SQL statement as its data source:

SELECT ID AS EntID, Name AS EntName FROM EntityMaster ORDER BY ID

on my form i have two fields, EntID and EntName.  I want the user to enter an ID in EntID that will be used to look up in EntityMaster and assign the corresponding EntName to the EntName field.

I have set up an exit script on the EntID field but it doesnt seem to be running:

EntName.rawValue = xfa.sourceSet.Entity.EntName.value;

ive also noticed that my scripts will not execute past the first line.  if i use the following, the script executes:

EntName.rawValue = "WTH";

can someone propose a script that will do what i need done?  take the value from EntID field, and return EntName from the database that corresponds to that ID value.

thanks

0 Replies