User defined rule looking up old column

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
User avatar
Kim Jeim
Posts: 31
Joined: Tue Jun 09, 2015

29 Sep 2015

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

User avatar
rostislav
Moderator
Posts: 364
Joined: Mon Oct 19, 2015

30 Sep 2015

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:

Code: Select all

[DivisionLookup] == '15;#Record Number Fifteen'
Alternatively, you can use the Contains function to match just the display value or just the ID, for example:

Code: Select all

Contains([DivisionLookup], ';#Record Number Fifteen')
Or for a more fine-grained approach, you can use a regular expression with Match:

Code: Select all

Match([DivisionLookup], 'your regular expression here')

User avatar
Kim Jeim
Posts: 31
Joined: Tue Jun 09, 2015

30 Sep 2015

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.

User avatar
rostislav
Moderator
Posts: 364
Joined: Mon Oct 19, 2015

01 Oct 2015

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

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 20 guests