User defined rule looking up old column
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
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
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:
Alternatively, you can use the Contains function to match just the display value or just the ID, for example:
Or for a more fine-grained approach, you can use a regular expression with Match:
Code: Select all
[DivisionLookup] == '15;#Record Number Fifteen'
Code: Select all
Contains([DivisionLookup], ';#Record Number Fifteen')
Code: Select all
Match([DivisionLookup], 'your regular expression here')
-
- Information
-
Who is online
Users browsing this forum: No registered users and 22 guests