SOLVED

Is it possible to filter a lookup column using a specific criteria?

%3CLINGO-SUB%20id%3D%22lingo-sub-103989%22%20slang%3D%22en-US%22%3EIs%20it%20possible%20to%20filter%20a%20lookup%20column%20using%20a%20specific%20criteria%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-103989%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20the%20following%20lists%20with%20a%20lookup%20column%20that%20has%20more%20than%205%2C000%20items%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CUL%3E%3CLI%3EPurchase%20Orders%20list%26nbsp%3B%3CUL%3E%3CLI%3EPO%20Number%20-%20text%3C%2FLI%3E%3CLI%3EStatus%20-%20Active%20or%20Closed%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3CLI%3EInvoices%20list%3CUL%3E%3CLI%3EPO%20Number%20-%20lookup%20column%20from%20Purchase%20Order%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20it%20be%20possible%20to%20filter%20out%20items%20displayed%20in%20the%20lookup%20column%20based%20on%20(Status%20%3D%20Active)%20so%20that%20the%20app%20doesn't%20need%20to%20have%20too%20many%20items%20in%20the%20dropdown%20list%20and%20avoid%20the%20following%20error%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%22This%20is%20a%20lookup%20column%20that%20displays%20data%20from%20another%20list%20that%20currently%20exceeds%20the%20List%20View%20Threshold%20defined%20by%20the%20administrator%20(5000).%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENote%2C%20I've%20tried%20to%20use%20a%20calculated%20column%20(IF(Status%3DActive%2C%22PO%20Number%22%2C%22%22))%20but%20this%20doesn't%20work.%20I%20saw%20a%20demo%20of%20custom%20InfoPath%20form%20with%20data%20filter%20but%20would%20like%20to%20investigate%20if%20there%20are%20other%20options%20first.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ffyano.wordpress.com%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EFred%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-103989%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3E2013%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EList%20View%20Threshold%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELookup%20Column%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-334375%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20filter%20a%20lookup%20column%20using%20a%20specific%20criteria%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-334375%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20for%20sharing%20this.%3C%2FP%3E%3CP%3EIt%20works%20fine%20for%20lists%20%26lt%3B%205%2C000%2C%20those%20with%20more%20than%205%2C000%20items%20will%20fail%20even%20if%20the%20number%20of%20items%20in%20the%20calculated%20column%20is%20%26lt%3B%205%2C000.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHey%2C%20Microsoft%2C%20I%20can't%20help%20to%20remind%20you%20that%205%2C000%20is%20not%20such%20large%20number%20anymore.%20You%20are%20keeping%20people%20shackled%20to%20a%20setting%20that%20is%20over%20A%20DECADE%20old!%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-172566%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20filter%20a%20lookup%20column%20using%20a%20specific%20criteria%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-172566%22%20slang%3D%22en-US%22%3EHi%20Scott%2C%3CBR%20%2F%3EI%20face%20the%20same%20situation%20that%20Fred%20described.%20%3CBR%20%2F%3EThanks%20for%20sharing%20Your%20simple%20but%20powerfull%20solution.%20%3CBR%20%2F%3EI%20will%20try%20it%20soon.%3CBR%20%2F%3E%3CBR%20%2F%3EPablo%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-108929%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20filter%20a%20lookup%20column%20using%20a%20specific%20criteria%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-108929%22%20slang%3D%22en-US%22%3EHi%2C%20Scott.%3CBR%20%2F%3EI%20will%20re-try%20this%20out%20with%20%5B%5D%20in%20the%20formula.%20I%20used%20it%20earlier%20as%20noted%20above%20and%20it%20still%20gave%20me%20an%20error%20when%20I%20attempted%20to%20use%20the%20Calculated%20column.%20I%20was%20not%20sure%20if%20the%20JavaScript%20that%20I%20added%20to%20pre-assign%20the%20lookup%20value%20is%20related%20to%20the%20issue.%3CBR%20%2F%3E%3CBR%20%2F%3EIn%20the%20meantime%2C%20I've%20also%20explored%20archiving%20the%20Closed%20items%20so%20that%20ideally%20the%20source%20list%20will%20be%20less%20than%205%2C000%20items%20at%20a%20time.%3CBR%20%2F%3E%3CBR%20%2F%3EAppreciate%20how%20you%20added%20the%20screenshots%20and%20actual%20formula.%3CBR%20%2F%3E%3CBR%20%2F%3EFred%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-108770%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20filter%20a%20lookup%20column%20using%20a%20specific%20criteria%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-108770%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20can%20call%20it%20a%20trick%20or%20a%20hack%2C%20but%20what%20I%20have%20done%20for%20filtered%20lookups%20is%20using%20calculated%20columns%20to%20display%20what%20I%20want%20in%20that%20column.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESay%20you%20have%20a%20Project%20list%20with%20a%20Status%20column%20and%20a%20Title%20column.%20The%20Title%20column%20is%20what%20you%20want%20to%20filter%20based%20on%20Status.%20Create%20a%20Calculated%20Title%20column%20called%20Active%20Projects%20with%20a%20calculation%20of%26nbsp%3B%3DIF(Status%3D%22Active%22%2C%5BTitle%5D%2C%22%22).%26nbsp%3BThis%20will%20create%20blank%20entries%20for%20items%20that%20do%20not%20have%20Status%3DActive.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThen%20go%20into%20your%20lookup%20column%20and%20point%20it%20to%20%22Active%20Project%22%20and%20it%20will%20not%20display%20anything%20that%20is%20blank.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBelow%20is%20an%20example%20I%20used%20for%20displaying%20only%20Active%20Students%2C%20same%20would%20be%20for%20Active%20Projects%20or%20POs%20or%20whatever.%20I%20use%20this%20process%20that%20has%20a%20source%20list%20of%208000%2B%20students%20with%20varying%20degree%20programs.%20I%20create%20calculated%20columns%20to%20only%20show%20students%20in%20lookup%20columns%20that%20match%20the%20degree%20criteria%20for%20that%20lookup.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20528px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F20517i9AA961A5EFA31651%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222017-09-21_8-02-59.png%22%20title%3D%222017-09-21_8-02-59.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-104456%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20filter%20a%20lookup%20column%20using%20a%20specific%20criteria%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-104456%22%20slang%3D%22en-US%22%3ESP2013%20Enterprise%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-104444%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20filter%20a%20lookup%20column%20using%20a%20specific%20criteria%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-104444%22%20slang%3D%22en-US%22%3Ewhat%20version%20of%20sharepoint%20are%20you%20using%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-104416%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20filter%20a%20lookup%20column%20using%20a%20specific%20criteria%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-104416%22%20slang%3D%22en-US%22%3EHi%2C%20Dean.%3CBR%20%2F%3EI%20did%20add%20PO%20Number%20and%20Status%20as%20user-defined%20indices%20but%20unfortunately%20still%20resulted%20into%20the%20error.%20As%20a%20workaround%2C%20I%20temporarily%20increased%20the%20threshold%20limit%20until%20I%20implement%20the%20archiving%20functionality.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-104414%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20filter%20a%20lookup%20column%20using%20a%20specific%20criteria%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-104414%22%20slang%3D%22en-US%22%3EThanks%2C%20Juan.%3CBR%20%2F%3EIt%20would%20be%20nice%20to%20use%20a%20specific%20list%20view%20that%20will%20be%20used%20by%20a%20lookup%20column.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-104412%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20filter%20a%20lookup%20column%20using%20a%20specific%20criteria%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-104412%22%20slang%3D%22en-US%22%3E%3CP%3Ehave%20you%20added%20an%20index%20to%20the%20Status%20column%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-104408%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20filter%20a%20lookup%20column%20using%20a%20specific%20criteria%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-104408%22%20slang%3D%22en-US%22%3EThanks%2C%20John.%3CBR%20%2F%3EThis%20what%20I%20have%20been%20considering%20at%20this%20point%20i.e.%20copy%20over%20Closed%20items%20into%20a%20separate%20archive%20list%2Fapp.%3CBR%20%2F%3E%3CBR%20%2F%3EI'll%20just%20have%20to%20think%20it%20through%20since%20I%20would%20imagine%20that%20people%20will%20still%20be%20interested%20to%20view%20Active%20and%20Closed%20items%20together%20for%20the%20current%20year.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-104052%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20filter%20a%20lookup%20column%20using%20a%20specific%20criteria%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-104052%22%20slang%3D%22en-US%22%3E%3CP%3ENot%20a%20fix%20for%20the%205000%20items%20issue%2C%20but%20an%20alternative%20to%20your%20current%20solution.%3C%2FP%3E%3CP%3ECan%20I%20assume%20that%20Purchase%20Orders%20and%20Invoices%20are%20not%20being%20changed%20ever%2C%20when%20the%20Purchase%20Order%20has%20status%20Closed%3F%20(I%20assume%20that)!%3C%2FP%3E%3CP%3EMove%20all%20Purchase%20Orders%20and%20Invoices%20into%20archive%20lists%20-%20Purchase%20Order%20Archive%20and%20Invoice%20Archive%20-%20thus%20keeping%20your%20active%20lists%20item%20count%20lower%2C%20hopefully%20below%20the%20limit.%3C%2FP%3E%3CP%3EKind%20regards%3C%2FP%3E%3CP%3EJohn%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-104047%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20filter%20a%20lookup%20column%20using%20a%20specific%20criteria%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-104047%22%20slang%3D%22en-US%22%3EIs%20this%20SPO%3F%20If%20so%2C%20there%20is%20not%20much%20you%20can%20do%20here%20in%20the%20list%20to%20avoid%20the%20threshold%20limit...as%20an%20alternative%20you%20could%20try%20either%20to%20use%20search%20to%20create%20your%20view%20or%20some%20custom%20development%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-815005%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20filter%20a%20lookup%20column%20using%20a%20specific%20criteria%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-815005%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F5277%22%20target%3D%22_blank%22%3E%40Scott%20Strausbaugh%3C%2FA%3Eexcellent%2C%20this%20did%20the%20trick.%20I%20was%20under%20the%20impression%20that%20calculated%20columns%20could%20not%20be%20used%20for%20lookup%20columns%20in%20another%20list%2C%20has%20this%20changed%20recently%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJust%20one%20minor%20caveat.%20How%20can%20I%20avoid%20the%20blank%20records%20(for%20each%20record%20with%20'None')%20from%20being%20displayed%20at%20the%20top%20of%20the%20combo%20box%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can%20move%20them%20to%20the%20bottom%20with%20the%20following%20formula%2C%20but%20descending%20sort%20order%20is%20not%20desired%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3ESort(Choices('Kaizen%20Championship'.Training_x0020_Batch)%2CValue%2CDescending)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3BIf%20I%20filter%20for%20non-blanks%2C%20it%20still%20shows%20one%20blank%20record%20at%20the%20top%2C%20can%20this%20be%20suppressed%20somehow%3F%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EFilter(Choices('Kaizen%20Championship'.Training_x0020_Batch)%2CNot(IsBlank('Training%20Batch')))%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F127804i676C684FA5BA652B%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-815014%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20filter%20a%20lookup%20column%20using%20a%20specific%20criteria%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-815014%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F140759%22%20target%3D%22_blank%22%3E%40Beat%20Zimmerman%3C%2FA%3E%26nbsp%3Byou%20need%20to%20add%20a%26nbsp%3B%3CSPAN%3E%2C%22%22%20to%20the%20end%20of%20your%20calculated%20column%20formula.%20That%20signifies%20blank%20if%20it%20doesn't%20meet%20the%20criteria%20and%20the%20drop-down%20will%20ignore%20blanks.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-815492%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20filter%20a%20lookup%20column%20using%20a%20specific%20criteria%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-815492%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F5277%22%20target%3D%22_blank%22%3E%40Scott%20Strausbaugh%3C%2FA%3EI%20have%20it%20like%20this%20already%20for%20the%20calculated%20column%20in%20the%20schedules%20list%3A%3C%2FP%3E%3CP%3E%3DIF(OR(%5BLast%20Enrollment%20Date%5D%26gt%3B%3DTODAY()%3B%5BLast%20Enrollment%20Date%5D%3D%22%22)%3B%5BTraining%20Batch%5D%3B%22%22)%3C%2FP%3E%3CP%3EThis%20works%20fine%2C%20batches%20with%20an%20overdue%20enrollment%20date%20get%20a%20blank%20value.%3C%2FP%3E%3CP%3EIn%20the%20enrollment%20list%20I%20have%20a%20column%20Training%20Batch%20which%20is%20a%20lookup%20column%20for%20Active%20Batches.%3C%2FP%3E%3CP%3EWhen%20I%20edit%20an%20item%20in%20a%20custom%20form%2C%20where%20the%20items%20for%20the%20Training%20Batch%20are%3C%2FP%3E%3CP%3EChoices('Kaizen%20Championship'.Training_x0020_Batch)%3C%2FP%3E%3CP%3EI%20get%20a%20blank%20row%20in%20the%20selector%20for%20each%20schedule%20that%20has%20a%20blank%20Training%20Batch.%3C%2FP%3E%3CP%3EI%20can%20reverse%20the%20order%3C%2FP%3E%3CP%3ESort(Choices('Kaizen%20Championship'.Training_x0020_Batch)%2CValue%2CDescending)%3C%2FP%3E%3CP%3Eso%20they%20appear%20at%20the%20very%20bottom.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20there's%20no%20way%20to%20suppress%20the%20blank%20entries.%20I%20actually%20suspect%20they%20are%20not%20blank%2C%20but%20some%20Null%20Strings%20or%20the%20like%2C%20as%20I%20can%20save%20the%20record%20to%20SharePoint%20leaving%20the%20field%20blank%20although%20it's%20a%20required%20field%20(both%20in%20the%20Form%20and%20in%20the%20List).%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20initial%20way%20to%20filter%20out%20the%20blanks%20actually%20didn't%20work%2C%20although%20it%20accepted%20the%20formula%20it%20stated%20that%20this%20formula%20requires%20scope%20which%20is%20not%20supported%20for%20evaluation.%20So%20I%20kept%20trying%20and%20found%20this%20one%20which%20does%20not%20require%20scope%20(at%20least%20it%20doesn't%20complain%20about%20it)%3A%3C%2FP%3E%3CP%3EFilter(Choices('Kaizen%20Championship'.Training_x0020_Batch)%2CNot(IsBlank('Kaizen%20Championship'.'Training_x0020_Batch')))%3C%2FP%3E%3CP%3EBut%20still%20it%20doesn't%20work.%20It's%20simply%20ignored%2C%20which%20as%20well%20would%20confirm%20the%20field%20is%20not%20actually%20empty.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20hints%20would%20be%20appreciated.%20Thank%20you!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1316490%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20filter%20a%20lookup%20column%20using%20a%20specific%20criteria%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1316490%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F5277%22%20target%3D%22_blank%22%3E%40Scott%20Strausbaugh%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20%22hack%22%20of%20using%20a%20calculated%20column%20value%20for%20the%20lookup%20list%20just%20made%20my%20day!!!%26nbsp%3B%20Wow%2C%20this%20was%20so%20easy.%26nbsp%3B%20I'm%20using%20it%20to%20filter%20a%20lookup%20column%20on%20a%20grid%20view.%26nbsp%3B%20The%20normal%20methods%20of%20CAML%20like%20I%20use%20on%20the%20Edit%20forms%20don't%20work%20in%20a%20grid%20view.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20to%20the%20author.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1596136%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20filter%20a%20lookup%20column%20using%20a%20specific%20criteria%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1596136%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F5277%22%20target%3D%22_blank%22%3E%40Scott%20Strausbaugh%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMay%20I%60m%20doing%20something%20wrong...%20As%20soon%20as%20I%20change%20the%20status%20from%20'active'%20to%20'inactive'%2C%20the%20reports%20of%20list%20with%20lookup%20field%20state%20'not%20assigned'%20in%20grouping%20this%20field.%20So%20link%20end%20seems%20loosing%2C%20which%20is%20an%20imaginary%20behaviour.%20I%20am%20quite%20new%20in%20SPO%2C%20is%20there%20a%20way%20to%20store%20the%20'ID'%20of%20those%20active%20records%20instead%20of%20the%20linked%20content%3F%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E
Frequent Contributor

I have the following lists with a lookup column that has more than 5,000 items: 

 

  • Purchase Orders list 
    • PO Number - text
    • Status - Active or Closed

  • Invoices list
    • PO Number - lookup column from Purchase Order

 

Is it be possible to filter out items displayed in the lookup column based on (Status = Active) so that the app doesn't need to have too many items in the dropdown list and avoid the following error?

 

"This is a lookup column that displays data from another list that currently exceeds the List View Threshold defined by the administrator (5000)."

 

Note, I've tried to use a calculated column (IF(Status=Active,"PO Number","")) but this doesn't work. I saw a demo of custom InfoPath form with data filter but would like to investigate if there are other options first. 

 

Thanks!

Fred

17 Replies
Is this SPO? If so, there is not much you can do here in the list to avoid the threshold limit...as an alternative you could try either to use search to create your view or some custom development
Best Response confirmed by Fred Y (Frequent Contributor)
Solution

Not a fix for the 5000 items issue, but an alternative to your current solution.

Can I assume that Purchase Orders and Invoices are not being changed ever, when the Purchase Order has status Closed? (I assume that)!

Move all Purchase Orders and Invoices into archive lists - Purchase Order Archive and Invoice Archive - thus keeping your active lists item count lower, hopefully below the limit.

Kind regards

John

Thanks, John.
This what I have been considering at this point i.e. copy over Closed items into a separate archive list/app.

I'll just have to think it through since I would imagine that people will still be interested to view Active and Closed items together for the current year.

have you added an index to the Status column?

Thanks, Juan.
It would be nice to use a specific list view that will be used by a lookup column.
Hi, Dean.
I did add PO Number and Status as user-defined indices but unfortunately still resulted into the error. As a workaround, I temporarily increased the threshold limit until I implement the archiving functionality.
what version of sharepoint are you using?

You can call it a trick or a hack, but what I have done for filtered lookups is using calculated columns to display what I want in that column. 

 

Say you have a Project list with a Status column and a Title column. The Title column is what you want to filter based on Status. Create a Calculated Title column called Active Projects with a calculation of =IF(Status="Active",[Title],""). This will create blank entries for items that do not have Status=Active.

 

Then go into your lookup column and point it to "Active Project" and it will not display anything that is blank.

 

Below is an example I used for displaying only Active Students, same would be for Active Projects or POs or whatever. I use this process that has a source list of 8000+ students with varying degree programs. I create calculated columns to only show students in lookup columns that match the degree criteria for that lookup.

2017-09-21_8-02-59.png

 

 

Hi, Scott.
I will re-try this out with [] in the formula. I used it earlier as noted above and it still gave me an error when I attempted to use the Calculated column. I was not sure if the JavaScript that I added to pre-assign the lookup value is related to the issue.

In the meantime, I've also explored archiving the Closed items so that ideally the source list will be less than 5,000 items at a time.

Appreciate how you added the screenshots and actual formula.

Fred
Hi Scott,
I face the same situation that Fred described.
Thanks for sharing Your simple but powerfull solution.
I will try it soon.

Pablo

Thank you for sharing this.

It works fine for lists < 5,000, those with more than 5,000 items will fail even if the number of items in the calculated column is < 5,000.

 

Hey, Microsoft, I can't help to remind you that 5,000 is not such large number anymore. You are keeping people shackled to a setting that is over A DECADE old! 

@Scott Strausbaughexcellent, this did the trick. I was under the impression that calculated columns could not be used for lookup columns in another list, has this changed recently?

 

Just one minor caveat. How can I avoid the blank records (for each record with 'None') from being displayed at the top of the combo box?

 

I can move them to the bottom with the following formula, but descending sort order is not desired:

Sort(Choices('Kaizen Championship'.Training_x0020_Batch),Value,Descending)

 If I filter for non-blanks, it still shows one blank record at the top, can this be suppressed somehow?

Filter(Choices('Kaizen Championship'.Training_x0020_Batch),Not(IsBlank('Training Batch')))

clipboard_image_0.png

@Beat Zimmerman you need to add a ,"" to the end of your calculated column formula. That signifies blank if it doesn't meet the criteria and the drop-down will ignore blanks.

@Scott StrausbaughI have it like this already for the calculated column in the schedules list:

=IF(OR([Last Enrollment Date]>=TODAY();[Last Enrollment Date]="");[Training Batch];"")

This works fine, batches with an overdue enrollment date get a blank value.

In the enrollment list I have a column Training Batch which is a lookup column for Active Batches.

When I edit an item in a custom form, where the items for the Training Batch are

Choices('Kaizen Championship'.Training_x0020_Batch)

I get a blank row in the selector for each schedule that has a blank Training Batch.

I can reverse the order

Sort(Choices('Kaizen Championship'.Training_x0020_Batch),Value,Descending)

so they appear at the very bottom.

 

But there's no way to suppress the blank entries. I actually suspect they are not blank, but some Null Strings or the like, as I can save the record to SharePoint leaving the field blank although it's a required field (both in the Form and in the List).

The initial way to filter out the blanks actually didn't work, although it accepted the formula it stated that this formula requires scope which is not supported for evaluation. So I kept trying and found this one which does not require scope (at least it doesn't complain about it):

Filter(Choices('Kaizen Championship'.Training_x0020_Batch),Not(IsBlank('Kaizen Championship'.'Training_x0020_Batch')))

But still it doesn't work. It's simply ignored, which as well would confirm the field is not actually empty.

 

Any hints would be appreciated. Thank you!

 

 

 

 

 

@Scott Strausbaugh 

 

This "hack" of using a calculated column value for the lookup list just made my day!!!  Wow, this was so easy.  I'm using it to filter a lookup column on a grid view.  The normal methods of CAML like I use on the Edit forms don't work in a grid view.

 

Thank you to the author.

@Scott Strausbaugh 

May I`m doing something wrong... As soon as I change the status from 'active' to 'inactive', the reports of list with lookup field state 'not assigned' in grouping this field. So link end seems loosing, which is an imaginary behaviour. I am quite new in SPO, is there a way to store the 'ID' of those active records instead of the linked content?

Thanks!