I am trying to work through a way to update a custom profile field based on the value in the Region field. In this case, if they live in Texas, they below to Region 1, if they live in NY then Region 2.

It makes it more difficult since the values stored in the UserProfile for Region are ID and not names...which makes linking a bit cumbersome...but that can be worked around...

Does anyone have any ideas? For most of my users this UserProfile row does not exists...so it has to be inserted....if it does exist, it has to be updated.

DNN 7.4 uses EntryID from Lists table, you may use to lookup the value (ISO code) and text (English Region Name).If you need to assign a different ID, you need a translation table (EntryID >> your code) and maybe a Trigger to set/update it automatically

Understood...and as I said...that part of the code is very straight forward.

I guess what I am looking for are examples of coding....probably using a cursor to step through each user and look up their region and then update/insert the value into a custom profile field I have created.

Content Layout

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.