You need to sign in to do that
Don't have an account?

count empty fields
Hi,
I want to count how many empty fields are in an object.
Is there a fast and easy way to do it in VF ?
First I was thinking about something like this :
<script type="text/javascript"> var i=0; if ('{!Object__c.field1}'!=null){ i=i++; } if ('{!Object__c.field2}'!=null){ i=i++; } ...
But this is too long...
Sounds like something you should be doing in your controller/extension via apex. You can use the describe classes to iterate over all the fields....
Well I guess I should try the describe class.
Thanks