Perform query and display value when lookup selecting

In my orders table when i select a customer name through lookup, i want to display
account balance of that specific customer.Is there any example, how to do that ?

You may use Aggregate (see the topic Field Setup in the help file).

You may simply use Auto fill feature from your “Lookup Table” pane under “Fields” setup of your PHPMaker project.

Please read “Lookup Table” topic from PHPMaker Help menu, and then see “Auto fill” for more info and example.