One or more code values in the lookup table either do not match the mask defined for the code or contain more than 255 characters

In this article, I will solve the below issue

One or more code values in the lookup table either do not match the mask defined for the code or contain more than 255 characters


Scenario

In Project Server, when I tried to create a two-level lookup table for a custom field by doing the following

  • PWA settings > Enterprise Custom field > Lookup Tables.

Create Custom fieldCreate a lookup table in Project Server

  • I have added two level value as shown below.

Multiple level lookup table field in Project Server

  • Once I finished and clicked save, I got the below error:

The Lookup table could not be saved due to the following reasons:

One or more code values in the lookup table either do not match the mask defined for the code or contain more than 255 characters

One or more code values in the lookup table either do not match the mask defined for the code or contain more than 255 characters


Cause

The Lookup table could not be saved due to the Code Mask is by default defined for only one level,

To add additional levels, you should at least define its Code Mask sequence field based on the mask of your level.

Define the Code Mask for Lookup Table In Project Server


Solution

In the “Lookup field” creation page, you should add a new code mask sequence level based on your level data type and the sequence number.

In my case, I have a string-level data type with tow level sequence. therefore, the code mask for two level should look like the following:

code mask

After adjusting The Lookup table Code Mask setting, try now to save it, that should be now saved properly.

Note: you must define a code mask for each level in your heraricy lookup table values.


Applies To
  • Project Server 2016.
  • Project Server 2013.
  • Project Server 2010.
Advertisements

2 thoughts on “One or more code values in the lookup table either do not match the mask defined for the code or contain more than 255 characters

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s