This topic is locked
[SOLVED]

 Update a field in Same Table

8/28/2020 5:50:10 PM
PHPRunner General questions
S
swilson63 author

Table Contacts, in this table there is a field named ConcatFLNm. I would like to update this field with the Last name and First name automatically most likely after record added. I am not sure if it is done after added, it is just my guess. Can you tell me the code to accomplish this?

Myr0n 8/28/2020



Table Contacts, in this table there is a field named ConcatFLNm. I would like to update this field with the Last name and First name automatically most likely after record added. I am not sure if it is done after added, it is just my guess. Can you tell me the code to accomplish this?


AfterAddedOccurs after new record was added you should use BeforeAddOccurs before new record is added in other words you need to put a code something like :Change values to adjust the action code to your project.

$values['ConcatFLNm']=$values['Last_name'].", ".$values['First_name'];


The content of ConcatFLNmwill be:

ConcatFLNm = "Lemieux, Jesuis"



The same code should work in BeforeEditwhen you are editing a record.