Do you have feedback on our new interface?
Do you have feedback on our new interface? Let us know HERE
Micro Focus Contributor
Micro Focus Contributor

<(RM) Support tip> - How to create location with an additional field set

Someone asked me today via email for a sample of how to create a location object and set one of its additional fields using the SDK. Here is a little example.

Location myNewLocation = new Location(db, LocationType.Person);
myNewLocation.GivenNames = "Peter";
myNewLocation.Surname = "Pluto";
myNewLocation.GenderValue = Gender.Custom1;

myNewLocation.LogsInAs = "peter.pluto";

myNewLocation.IsWithin = true;

FieldDefinition myfield = new FieldDefinition(db, "countrycode");

UserFieldValue myvalue = new UserFieldValue("abc123");

myNewLocation.SetFieldValue(myfield, myvalue);


The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.