Optimizely Form responses in their own tblBigTable

Vote:
 

Is it possible to write all form response data in a separate big table? 

I can probably inherit from DdsPermanentStorage and get something working but I was hoping to do it in a more supported way. 

#317751
Feb 26, 2024 12:15
Vote:
 

Can't claim to be Form expert but you can inherit DdsPermanentStorage and override GetFormStore which return a store in a separate table. 

but what are your motivations of having Form own table? 

#317752
Feb 26, 2024 13:25
Vote:
 

Thanks.. yes I do just want a separate table. It doesn't seem very supported; there's no interface to create one, you have to run a SQL script?

Anyway, when I create a separate tblBigTableForms, it is not populating a new's form data. When I create my own DdsPermanentStorage class and override all it's methods, it is just these changes that seem needed:



But on initialising the store on the first form submission, I get: 



It seems that method doesn't create the registration of this form like it normally does; an entry in tblBigTableStoreConfig, multiple in tblBigTableStoreInfo, a VW_FormData and a Save_FormData stored procedure.

As for the motivation.. it's not logical to me, but the client wants it in a separate table for security reasons. 

#317799
Feb 27, 2024 3:16
Vote:
 

This is how I think it should work - pseudo code obviously so untested. note that this code needs to run first before the table is created. migration is a separate matter

        protected override DynamicDataStore GetFormStore(FormIdentity formIden)
        {
            var dbName = GetFormDbName(formIden);
            return _ddsFactory.GetStore(typeof(Forms)) ?? _ddsFactory.CreateStore(typeof(Forms), CreateStoreParameters());
        }         
        internal static StoreDefinitionParameters CreateStoreParameters()
        {   
        var storeParameters = Reflector.GetStoreDefinitionParametersForType(typeof(Forms));
        storeParameters.TableName = <Your custom table name>;
        storeParameters.IndexNames.Add("abc"); //add your indexes
        return storeParameters;
        }
#317801
Feb 27, 2024 7:11
Vote:
 

Ah yes that's similar to what I had. 
Turns out I hadn't created the new big table properly.

I extracted the EpiServer.Cms.Core.sql statements that had to do with tblBigTable, renamed to my own tblBigTable2 and now it works. 
Thanks!

#317882
Feb 28, 2024 6:26
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.