Search for one or more keywords


#1

I have a graph that searches for a room parameter for the grade. Based on the grade level, the formula to calculate student capacity will take one of three branches. For example, if the Room is a “Fourth” grade class the area per student is 32 SF, but if the Room is a “Fifth” grade classroom the area per student is 28 SF.

My current graph has a separate branch for each grade from PreK to Twelvth. I could simplify this to three branches were it possible to search the text parameter with an ‘or’ string search.


#2

GroupByKey?


#3

You could use an Or statement to check each subelement, or you could just use List.ContainsItem.


#4

I’ll play around with both suggestions tonight, here is a link to my graph https://www.dropbox.com/sh/mgopwzvaj293bps/AAByZJ9r4qJ6YE4oemSdEQeCa?dl=0
As you can see, it gets pretty busy.


#5

I tried both ways. In the first case, how can I account for a variable number of list items and a flexible list of keys?


In the second case, I don’t understand how to apply this technique to a random collection of keywords.

Ideally, I would either create or find a database of all the combinations of identifying grade levels, ideally with misspellings (sort of like a rainbow table of grade names) to use as a basis for sorting all the rooms I come across in K-12 Revit models. This is the graph I am trying to simplify and make more flexible/user friendly.

Even if I didn’t have a complete lookup table of keywords, with enough input keywords, I could cover the majority of what users will call classrooms with simple instructions, like “for this to work, spell grade and don’t use numbers.” Then if the occassional number was used or a common misspelling like “Fouth” I might be able to catch as well.Classrom capacity dy-v2.1.dyn (173.6 KB)