I have a small form with 4 fields and would like to insert the data from 3 of the fields into a column in the SQL database table. For example, I would like to take the 3 fields: FirstName LastName UserID and insert it into another field in the database like LastName","FirstName “-” UserID. So if the form fields data is FirstName = John and LastName = Smith and UserID = 123456789 then I would like the text string to be inserted into the table as “Smith,John - 123456789”. How can I make this happen on the form?
In event after insert you can do it using a macro for that.
Hi Pauldev,
You can concatenate the string with the field labels like {firstName},{lastName} and {userId} and then insert this string with the event onAfterInsert. Let me know if this works.
Lokesh Patel
Igetis Solutions
Pune, INDIA
If the field is on the same table just include in the form and in event before insert/update compose the field concatenating the others
{ComposedField} = {firstName}.’, ‘.{lastName}.’ - '. {userId};
Otherwise if on different table you have to execute an INSERT or UPDATE statement after Insert or Update events.