Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Bizform Entries Count View modes: 
User avatar
Member
Member
tspring-allegra - 4/4/2011 10:56:51 AM
   
Bizform Entries Count
Hi

I'm having a strange problem with the entries count within the CMSDesk/Tools/Bizform page on a Bizform. I manually deleted some row entries via the database table itself but after doing that the entry count on the page still showed the original count. I tried going back into the database and manually updating the FormItems value in the CMS_Form table, which seamed to fix the problem until someone added a new entry into the Bizform and it reset to an old value again.

Is the entry count stored elsewhere?

The count has got so messed-up that it now displays a count of around 300 less entries than there actually are in the table.

Thanks,
Tim

User avatar
Member
Member
kentico_michal - 4/7/2011 3:00:42 AM
   
RE:Bizform Entries Count
Hello Tim,

Could you please let me know whether you use caching?

If so, could you please try to clear cache in Site manager -> Administration -> System?

Then if you add or remove any BizFrom record directly in CMS Desk, the count of BizForm entries should be refreshed.


Best regards,
Michal Legen

User avatar
Member
Member
tspring-allegra - 4/8/2011 4:42:02 AM
   
RE:Bizform Entries Count
Hi

Thanks for the help. We should be using whatever the default caching settings are.

I tried your advice, and even reset the application and restarted IIS just to make sure.

The count was ok when I tried to add a record via the CMSDesk, and was ok when the first couple of entries via the website were entered. But as there were more entries via the website the count has become out-of-sync again.

It's been 3hrs since I reset everything and there have been 149 entries via the website, but the count is now out of sync by around 12 counts and is slightly increasing out-of-sync with time.

I am using the Bizform API to create the record entries via the website, I dont know if that makes any difference. The code i'm using is exactly the same as the help file: http://devnet.kentico.com/docs/devguide/index.html?api_bizforms_creating_a_new_record.htm Only I create multiple entires by looping through this code via a FOR loop with a loop count determined by a field selected on the webpage.

Thanks,
Tim

User avatar
Member
Member
kentico_michal - 4/13/2011 4:37:47 AM
   
RE:Bizform Entries Count
Hi Tim,

To be honest, this is quite strange behavior. How many records are stored in the content table of your BizForm?

Please make sure that you call bfi.FormItems++ when creating a BizForm record and bfi.FormItems—- when deleting any record.

Would it be possible to post here the code you are using to create BizForm records? Thank you.


Best regards,
Michal Legen

User avatar
Member
Member
tspring-allegra - 4/13/2011 6:14:26 AM
   
RE:Bizform Entries Count
Hi

There were a few thousand records in the table, currently at 5245, I dont know if that could be the reason?

The code i'm currently using is:

string bizFormName = "My_Bizform";
string siteName = "My_Site";
BizFormInfo bfi = BizFormInfoProvider.GetBizFormInfo(bizFormName, siteName);
if (bfi != null)
{
DataClassInfo dci = DataClassInfoProvider.GetDataClass(bfi.FormClassID);
if (dci != null)
{
for (int i = 0; i < Loop_Count; i++)
{
GeneralConnection genConn = ConnectionHelper.GetConnection();
DataClass formRecord = new DataClass(dci.ClassName, genConn);
formRecord.SetValue("FormInserted", DateTime.Now);
//Set other values
formRecord.Insert();
bfi.FormItems++;
BizFormInfoProvider.SetBizFormInfo(bfi);
}
}
}


Thanks,
Tim

User avatar
Member
Member
kentico_michal - 4/19/2011 8:39:12 AM
   
RE:Bizform Entries Count
Hi Tim,

Had you encountered this issue before you manually deleted some rows entries as you mentioned in the first post?

Could you please try to use BizFormInfoProvider.RefreshDataCount method after you insert a new item. This method should refresh bizform items count.

Best regards,
Michal Legen