Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Long text calc for JSON randomly drops text elements


naplesweb
 Share

Recommended Posts

I have a fairly long text calculation I use to produce JSON from a database with lots of little text elements and a few lookups etc.  
Not very complex, but there are lots of lines like the sample below. 

I use Filemaker to dynamically create JSON post info that I feed into "JMeter" - an automation and testing tool.

The issue is that the result will sometimes - seemingly randomly - omit a data element in the calculation's resulting text
Curious if anyone experienced anything like this...

Randomly dropping elements often results in invalid JSON and always in some part of the data not posting - in sometimes very subtle ways.

Additionally strange: I put lots of comments in my calcs similar to the sample, and have noticed that shortening some of the comments or remove spaces from the comments the impacted/missing element may "move" to another element.
Am I running into some limit for the calculation size to cause this sort of instability? 

The calculation that's running me in circles right now is 13233 characters and 253 lines -- the expected calc result is in the range of 5000 characters - all on one line.
Filemaker Pro Advanced 18

"{"
& "\"FormType\":1"
& ",\"QuoteNumber\":\"${policyNumber}\"" // note: values with ${variable} format are substituted during execution by JMeter
& ",\"PolicyId\":${policyId}"
& ",\"CompanyId\":3"
& ",\"PolicyImageNum\":1"
& ",\"PolicyStatus\":12" 
& ",\"EffectiveDate\":\"" & ~EffectiveDate & "\""      
& ",\"PrevEffectiveDate\":\"" & ~EffectiveDate & "\""
& ",\"AnnualPremium\":${annualPremium}" 
& ",\"AgencyId\":" & agencycode::~AgencyId   // set PER RUN - agencycode looks up the appropriate ID.
& ",\"ReferredById\":13"                     // 13 = ROLLOVER, NOTE: portal RM 44671
// ...and so on, for about another 240 rows...

 

Link to comment
Share on other sites

  • 2 weeks later...

Still no idea what the issue is, but I have been able to get around it by moving to super short comments, and perhaps more impactful - combining multiple rows (so fewer " " & " " clauses overall)  Further solidifies my theory this is a maximum I'm hitting.

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use