User defined rule looking up old column

rss

Posted by tjon.kim - Sep 29 ’15 at 11:57

Hi,

 

We recently changed from using a "Choice" field to a "Lookup" field. The field was called Division (internal field name: "Division"). We cannot get rid of the old field because it was used in snapshots of the list (for trending data) for the last two years. I renamed the field "Old Division", and created a new lookup field, gave it an internal field name of "DivisionLookup" and then changed it to "Division". This is because the names of the divisions may change in the future.

 

I used [Division] in the user defined rule but it always seems to be looking for [Old Division], leading me to think it wants to use internal field names. If I use [DivisionLookup] it does not validate. Users are unable to see the proper forms for new list items because the "Old Division" field will be empty moving forward.

 

How do I tweak the user defined rule for that group of forms? Many thanks in advance.

 

Best Regards,

Tjon Kim

  • rostislav
    rostislav
    Moderator
    Member for: 6 years 6 months 24 days
    #1 by rostislav Sep 30 ’15 at 06:00

    Value in the lookup field has a format of "ID;#Value", where ID is the id of the entry in the field and Value is it's display value. So your code would look something like this:

    [DivisionLookup] == '15;#Record Number Fifteen'
    

    Alternatively, you can use the Contains function to match just the display value or just the ID, for example:

    Contains([DivisionLookup], ';#Record Number Fifteen')
    

    Or for a more fine-grained approach, you can use a regular expression with Match:

    Match([DivisionLookup], 'your regular expression here')
    
  • tjon.kim
    Member
    Member for: 6 years 7 months 13 days
    #2 by tjon.kim Sep 30 ’15 at 05:30

    [#1]: Thanks for response. I was not using internal field name the first time, that was why it was not working. Thanks! Why can you sometimes have [Assigned To] when the internal field name is [AssignedTo], without the space? Just for knowledge.

  • rostislav
    rostislav
    Moderator
    Member for: 6 years 6 months 24 days
    #3 by rostislav Oct 1 ’15 at 07:11

    [#2]:

    User defined group rules work the following way: field's InternalName is used and if it is not resolved, then Title is used.

Displaying 1 to 3 of 3 messages