Skip to Content
0
Former Member
May 26, 2011 at 10:30 AM

Return array value based on selection criteria

65 Views

I have one data field that holds text data similar to below:

"Meeting Room 1 (Projector), Meeting Room 2 (Whiteboard), Meeting Room 3 (Video Conferencing)"

"Meeting Room 3 (LCD Display), Meeting Room 1 (Video Conferencing), Meeting Room 2 (Whiteboard)"

The meeting rooms are not always in the same order, I cant count on Meeting Room 1 being followed by Meeting Room 2 etc.

My objective is to only return the meeting room that has the Whiteboard.

I'm aware that I can use SPLIT to seperate the Meeting Rooms by the comma and place their components into an array.

What I'm not sure how to do is return the meeting room with the Whiteboard when that could be [1] in the Array or [2] or [3] in the array.

I need to return the array value based on its contents. Could someone help me 'search' the array created by the SPLIT command and always return that value with the word 'Whiteboard'