Developer forum

Forum » Development » custom fields

Reply

I'm attempting to work with some custom fields on the NewsletterExtended module.


 


I've created 3 fields for recipients via the backend, type text, not mandatory.


 


The fields are created in the database "NewsletterCustomField_", all cool so far.


The fields also show up when I click a recipient, however, the values are not loaded into the text boxes and I can see that the database fields does contain data.


 


Any ideas?


 


I assume these fields expect the actual value only (since a new db column is created per custom field) and not some xml plob, or am I wrong?


 


Replies

 
Reply
pl@xtendit.dk wrote:


I'm attempting to work with some custom fields on the NewsletterExtended module.




 




I've created 3 fields for recipients via the backend, type text, not mandatory.




 




The fields are created in the database "NewsletterCustomField_", all cool so far.




The fields also show up when I click a recipient, however, the values are not loaded into the text boxes and I can see that the database fields does contain data.




 




Any ideas?




 




I assume these fields expect the actual value only (since a new db column is created per custom field) and not some xml plob, or am I wrong?




 



If I try to add data to the text fields on a recipient from the backend, I can see it's added to the database, just as I was doing it (directly to the database), however, this time the data remains in the fields, if I browse away from the recipient and then come back, the data is still there...


 


Is data in custom fields stored somewhere else besides the actual new database fields?


It seems very strange... 


 


Howcome the custom field data only displays in the custom fields section of the recipient in the backend, when inserted from the backend and not when inserted into the database, when format of data is the same?

 
Reply
Hi,

In the Newsletter Extended module custom fields are stored in these tables:

NewsletterExtendedUserField - contains custom field "schema": name, type, required flag and so on

NewsletterExtendedUserFieldData - contains custom field's data for recipients.

So, check these tables in your Application, they should contain the data you've entered.
 
Reply
vme wrote:

Hi,



In the Newsletter Extended module custom fields are stored in these tables:



NewsletterExtendedUserField - contains custom field "schema": name, type, required flag and so on



NewsletterExtendedUserFieldData - contains custom field's data for recipients.



So, check these tables in your Application, they should contain the data you've entered.



Ok, I'll check those out.


 


But please tell me then, what are the columns used for in the Recipient table named "NewsletterCustomField_" because these columns also contain the data if I enter data into the custom fields from the backend,


and also, should I still write data to these as well, since the backend appears to be doing so?

 
Reply
Apparently the module uses both methods to extend recipient: by adding new field to the recipients table and by adding the same fields to a separate table. This module has rather long history... Probably this feature was made for flexibility of select statements you can use to extract/manage fields data.
 
Reply
vme wrote:

Apparently the module uses both methods to extend recipient: by adding new field to the recipients table and by adding the same fields to a separate table. This module has rather long history... Probably this feature was made for flexibility of select statements you can use to extract/manage fields data.




Does this mean, that I can just insert Custom Field Data into [NewsletterExtendedUserFieldData] and thats it?


 


I've tried to do this while not inserting data into the new columns in [NewsletterExtendedRecipient] which appears to work for the backend. At least it does show the data in the fields when I click a recipient in the backend.


 


But the question is,


- Is this ok or will the lack data in the [NewsletterExtendedRecipient].[] pose a problem in some way for other parts of Dynamicweb or is it just the remains of old versions?

 
Reply
As I see, the [NewsletterExtendedRecipient].[] field used at least in the newsletter preview. So, to avoid unexpected problems, I recommend to fill the data the same way as DW's core code does - in both places.

 

You must be logged in to post in the forum