JeffPatrick1
3 years agoQrew Member
Formula Query
Constructing a Formula Query to auto-number payments that are part of the same Stripe Subscription. All of the payment records are in the Trans.Donations table.
[Stripe Subscription ID] is the identifier for the subscription. So, we first want all of the Trans.Donations records that are part of the same subscription. [Stripe Subscription ID] is field 96.
Nextt, we want to find the records that are AFTER the current Trans.Donations record. This uses the field which is field 24.
This is the definition in the Formula Numeric Field on the Trans.Donations table:
var text QUERY = "{96.EX.'"&[Stripe Subscription ID]&"'}AND{24.AF.'"&&"'}";
Size(GetRecords($QUERY))+1)
I'm getting an error on the first statement (the var definition). The error is indicated at the end of the statement, and the error is "Expecting number"
Where is my syntax incorrect?
------------------------------
Jeff
------------------------------
[Stripe Subscription ID] is the identifier for the subscription. So, we first want all of the Trans.Donations records that are part of the same subscription. [Stripe Subscription ID] is field 96.
Nextt, we want to find the records that are AFTER the current Trans.Donations record. This uses the field which is field 24.
This is the definition in the Formula Numeric Field on the Trans.Donations table:
var text QUERY = "{96.EX.'"&[Stripe Subscription ID]&"'}AND{24.AF.'"&&"'}";
Size(GetRecords($QUERY))+1)
I'm getting an error on the first statement (the var definition). The error is indicated at the end of the statement, and the error is "Expecting number"
Where is my syntax incorrect?
------------------------------
Jeff
------------------------------