The single quotes don’t work. Try:
[cfdb-value form="Flag Database" trans="FlagLeasePrice=str_replace($,,FlagLeasePrice)" function="sum" show="FlagLeasePrice"]
If that doesn’t work, take out the function=”sum” to see what it is actually giving you for FlagLeasePrice.
I’m not sure if function="sum" will play well with the transform. You might need to remove function=”sum” and replace it with a transform that does the sum.
trans="FlagLeasePrice=str_replace($,,FlagLeasePrice)&&SumField(FlagLeasePrice)"
Thread Starter
andywt
(@andywt)
I changed the shortcode to `[cfdb-value form=”Flag Database” trans=”FlagLeasePrice=str_replace(“$”,””,FlagLeasePrice)” show=”FlagLeasePrice”]’
and FlagLeasePrice continue to show the $.
You didn’t take out the quotes. Try what I gave you.
Thread Starter
andywt
(@andywt)
Sorry Mike. Tried that and the FagLeasePrice goes to “”.
Here is the printout without the transform:
no transform printout
Here is the shortcode with the transform and the printout:
[cfdb-datatable form="Flag Database" trans="FlagLease=str_replace($,,FlagLeasePrice)" show="FlagLease"]
transform printoiut
I think there is a bug parsing that empty value. I’ll fix this shortly.
Try it with version 2.10.2 which should be available in a little while.
Thread Starter
andywt
(@andywt)
Michael,
The parsing issue is fixed but there seems to be another issue. I am using the cfdb-value to produce some stats about the database. I was using:
[cfdb-value form="Flag Database" filter="payment_status=Paid"
function="count" show="payment_status"]
To count the number of records that are marked Paid. It produces a number but it doesn’t reconcile to what I compute using an Excel dump of the file. What I found was the filter does not work. I tried search and got the same result. I then change the shortcode to cfdb-datable with all the rest the same and the results show that the filter is not working. Here is a dump of the output:
Filter Debug Dump
I know the filter works as I use it to produce other reports.
I’m not sure what is going on here. Make sure there is no line break inside the short code. If the filter part appears on a 2nd line, it might not be read.