This topic is locked

input text field in list page

8/10/2017 1:09:59 AM
PHPRunner General questions
author

Hello friends!

I have a

table1

with fields

date,Customer, Income ,Invoice

,

And my Custom view sql looks Like:

Select customer.table1

Sum(Income.table1) as Total Income

Sum(Invoice.table1) as InvoiceTotal,

Sum(Income.table1)- Sum(Invoice.table1) As Balance

From table1

Where date.table1 <" *precisedDate*"

Group by customer . table1



Now in list page I want to be able to type (input) a *

precisedDate


  • And the query will recalculate balance according to theprecisedDate I type.

    Please help

90288 8/11/2017

Any Help Please

Sergey Kornilov admin 8/11/2017

You don't need to add WHERE clause to your SQL Query.
Add precisedDate field to search panel and make sure that 'less' is the only option available. This can be done in PHPRunner on 'Choose fields' screen, under 'Search and filter settings'.

90288 8/12/2017



You don't need to add WHERE clause to your SQL Query.
Add precisedDate field to search panel and make sure that 'less' is the only option available. This can be done in PHPRunner on 'Choose fields' screen, under 'Search and filter settings'.



Thank you very much Sergey for very useful reply , but about if for example the two amounts (income and Invoice) are not in same currency and i want user to input the exchange rate then it will be calculated like

Sum(Income.table1)- (Sum(Invoice.table1)X "exchangeRate") As Balance.
exchangeRate is not a field in any table and i dont want it to be

I would really appreciate if i get solution for this

I remeber i saw in a phprunner demo or template a way of inserting data in list page