Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Default custom boolean field to true View modes: 
User avatar
Member
Member
jwynveen - 10/30/2013 1:09:47 PM
   
Default custom boolean field to true
I've added a custom field to the system table User-Settings called EmailOptIn. It is a boolean field using a radio list to select yes or no. I would like this to default to true for all users, but when I checked "Default value" and added it, I see it as no for existing users. How can I make sure this gets set to true for existing and new users.

Note: I know I could work around this by making the field "EmailOptOUT", but that's not the way I want the field to be. I also know I could run a SQL query to set this field to true for all users once I add it. That feels like a hack and I feel like I should be able to do it through the CMS interface.

User avatar
Kentico Consulting
Kentico Consulting
Kentico_RichardS - 11/1/2013 5:54:47 AM
   
RE:Default custom boolean field to true
Hi,

Thank you for your message.

Unfortunately you will have to run a sql query or use our API in order to change the value for existing users manually. The Default value works only for new records which are inserted into database.

It is really not a hack, if you need it you are free to set it. You could also do this via CMS Desk when editing a particular user, but that wouldnt feel much better .. :)

So te SQL query or API is the way to go here.

Let us know if you have any other questions.

Kind regards,
Richard Sustek