You are viewing limited content. For full access, please sign in.

Question

Question

How to SUM from a database?

asked on July 13, 2018

Hi all,

 

I have a database like this

 

I want to retrieve the hours's SUM for each month's day and put this values inside a Web Form.

 

 

Actually, I created another table with the SUM for each date and used a look-up table for each date.

 

 

I'm pretty sure this is not correct and need your help to optimize my form.

 

Thanks in advance.

Regards

 

0 0

Replies

replied on July 13, 2018

Hi Olivier

You table above appears to be very specific, are you selecting the Dates Manually and then returning the Result of the SUM based on that as I don't see another variable that you are using in your query

If you used a table you could use 2 queries to provide what you are looking for I think.
You Table would have two columns, Date and SUM
 

The Query for the Date 
When "what is the trigger to find the row in the DB, Fill the Date with Date (Add new Rows)

The second Query (SUM)

When Date (from the Row) = Date in the DB, Return the SUM value to the SUM field

Hope this helps

Steve

0 0
replied on July 13, 2018 Show version history

Hi Steve,

Thanks for your help.

 

I'm using a formula for each fields to get the date

 

My primary table don't have SUM (see date = 2018-07-15, I have 2 results).

After each submission, I'm using workflow to populate a new table (SUM) and get the news values because idk how to do in Web Form.

 

Under Laserfiche Form and using 1 request (if possible), I want to get the SUM for each dates.

Using your solution I need 31 requests (each date) and this is pretty slow.

 

If this is possible, I don't want to use the table SUM.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.