Skip to main content
Topic: Need some advice about Custom field (Read 2214 times) previous topic - next topic



Re: Need some advice about Custom field

Reply #3
@willvin  Did custom field support sql to other table?
example if I have 2 table
1.customer
2.customer_outcome
If I want sum of customer_outcome,can I coding like this on expression of custom field?
Code: [Select]
SELECT SUM(outcome_value) 
  FROM customer_outcome GROUP BY id_cus
PS.Custom field created on list page of customer table.

Re: Need some advice about Custom field

Reply #4
@tin‍ it might work in some cases like this
Code: [Select]
 (SELECT COUNT(*) FROM dependents WHERE employees.employee_id = dependents.employee_id)

but the example you gave, might not work because the custom field expects the return of a single value not multiple as in a group.

Re: Need some advice about Custom field

Reply #5
Ok I will try.It look like I need ( ) on start sql statement.