Skip to main content
Question

New Formula Queries

  • December 29, 2021
  • 0 replies
  • 19 views

Forum|alt.badge.img+4
I am using the new formula queries to sum the total days billed in an unrelated table like this

SumValues(GetRecords("{96.EX.'" & [Record ID#] & "'}",[_DBID_BILLINGS]),120)

I want to add another field like this just with one more query within it to just return the total days billed in the last 7 days and not sure the best approach.

Thank you!

------------------------------
Ryan Locke
------------------------------
This topic has been closed for replies.

Forum|alt.badge.img+4
Do you have a field that indicates when it started billing? You could do something like

var number billing = SumValues(GetRecords("{96.EX.'" & [Record ID#] & "'}",[_DBID_BILLINGS]),**Billing Field Value**)

If([Your Previous Formula]>=7,
    $billing * 7,
    
    $billing * [Previous formula with # of days billed]​

Granted, I have no idea if that will work as I didn't test it first. That is what I would start with though, it seems at least to be in the right path. I hope that helps!

------------------------------
Sean Connaughton
------------------------------