How to auto populate time zone according to location in the user table ???

Kristina2
Tera Contributor

How to auto populate time zone according to location in the user table ???

8 REPLIES 8

venkatiyer1
Giga Guru

Hi Sree,



I have some questions which will help us identify a solution:



1. How are your users being created?


2. When exactly do you want to populate the location? Is it on a one time basis(i.e. first time logging )in or ongoing need.


The time zone of the user should populate when we create a new user , according to the location




Whenever a new user is created, his time zone should be autopopulated from user.location.u_site.u_time_zone




This should also occur when an existing user is changing location.


Hi Sree,



I'll assume that user.location is the standard location field that references cmn_location and you've added a few fields (including a u_site field that, in turn, references a time zone table with u_time_zone.) If that's the case, then a simple BEFORE (Insert) business rule could do the trick.



current.time_zone = current.location.u_site.u_time_zone;


venkatiyer1
Giga Guru

Hi Sree,



What is user.location.u_site.u_time_zone? is that an import table?