We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Create a calculated field

Development and Programming

Monarobase's avatar
Monarobase
77 posts
15 years ago
Monarobase's avatar Monarobase

Hello,

What would be the best approach to calculate a field automatically ?

For instance I want a user to be able to subscribe to my site and it to generate a unique ID based on :

Initials of first and last name + number of other people with same initials + 1 site ID (to differentiate a user who subscribed on english version or french version) unique 5 digit number.

So I would have for instance :

JS6-GBSITE-67364

JS : John Smith 6 : There are already 5 other users with initials JS GBSITE : Site ID 67364 : random number

Why do I need this ?

I need this to make an affiliate system.

I have already created this system with codeigniter but would like to use Expression Engine members system to be able to easily add on the forum / wiki module.

Another application of the calculated field is that I need to create a reference number for each product in my product channel.

Should I convert this to a hook to achieve this ? or can Expression Engine already do this ?

       
Santa Fe's avatar
Santa Fe
7 posts
15 years ago
Santa Fe's avatar Santa Fe

I also am wondering this. I have a case where I want to calculate a percentage based on two other fields so that I can do a sort by percentage. But I would need to do this through a calculated field type behavior.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.