SOLVED

MC211640: Conditionally show or hide columns in a SharePoint list or library form

%3CLINGO-SUB%20id%3D%22lingo-sub-1431279%22%20slang%3D%22en-US%22%3EMC211640%3A%20Conditionally%20show%20or%20hide%20columns%20in%20a%20SharePoint%20list%20or%20library%20form%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1431279%22%20slang%3D%22en-US%22%3E%3CP%3EAfter%20several%20attempts%20to%20operate%20a%20conditional%20field%20on%20item%20form%2C%20the%20formula%20still%20invalid.%3C%2FP%3E%3CP%3EThe%20use%20case%20is%20the%20following%20one%3A%3C%2FP%3E%3CUL%3E%3CLI%3E1%20column%20Provider%2C%20type%20Choice%20with%202%20values%3C%2FLI%3E%3CLI%3E2%20other%20columns%20msProducts%20and%20pnpProducts%2C%20type%20Choice%3C%2FLI%3E%3CLI%3EWhen%20the%20provider%20is%20equals%20to%20Microsoft%2C%20the%20column%20msProducts%20should%20appear%3C%2FLI%3E%3CLI%3EFrom%20the%20default%20SP%20form%2C%20click%20on%20Edit%20form%20%26gt%3B%20Edit%20columns%20%26gt%3B%20(Ellipsis%20on%20msPorducts)%20%26gt%3B%20Edit%20conditional%20formula%3C%2FLI%3E%3CLI%3EThe%20tested%20formulas%20with%20invalid%20condition%20are%3A%3COL%3E%3CLI%3E%3Dif(%5B%24Provider%5D%3D%3D'Microsoft'%2C%20'true'%2C%20'false')%20%3A%20formula%20suggested%20by%20the%20official%20documentation%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fdeclarative-customization%2Flist-form-conditional-show-hide%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fdeclarative-customization%2Flist-form-conditional-show-hide%3C%2FA%3E%3C%2FLI%3E%3CLI%3E%3Dif(%5BProvider%5D%3D%3D'Microsoft'%2C%20'true'%2C%20'false')%3C%2FLI%3E%3CLI%3E%3Dif(Provider%3D%3D'Microsoft'%2C%20'true'%2C%20'false')%3C%2FLI%3E%3C%2FOL%3E%3C%2FLI%3E%3C%2FUL%3E%3CPRE%3EThe%20same%20tests%20are%20performed%20by%20replacing%20'%3D%3D'%20by%20'%3D'%20and%20by%20removing%20the%20simple%20quote%20around%20true%20%26amp%3B%20false%3C%2FPRE%3E%3CUL%3E%3CLI%3EThis%20formula%20is%20valid%20but%20does%20not%20work%3COL%3E%3CLI%3E%3Dif(%40Provider%3D%3D'Microsoft'%2C%20'true'%2C%20'false')%3C%2FLI%3E%3C%2FOL%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3EThe%20conditional%20formula%20is%20not%20functional%20currently%20or%20something%20is%20wrong%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1431279%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1432035%22%20slang%3D%22en-US%22%3ERe%3A%20MC211640%3A%20Conditionally%20show%20or%20hide%20columns%20in%20a%20SharePoint%20list%20or%20library%20form%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1432035%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F56193%22%20target%3D%22_blank%22%3E%40Laurent%20SITTLER%3C%2FA%3E%26nbsp%3BAs%20far%20I%20have%20tested%20this%20function%20only%20works%20in%20the%20display%20form%20not%20in%20Edit%20or%20New%20Form.%20Even%20they%20don't%20allow%20to%20save%20the%20formula%20as%20real%20time%20evaluation%20of%20fields%20are%20not%20happening.%3C%2FP%3E%3CP%3ESee%20the%20below%20screen%20shots%3A%201.%20New%20Form%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Vikram_Samal_0-1591045077007.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F195825iB1B311659F665AC0%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Vikram_Samal_0-1591045077007.png%22%20alt%3D%22Vikram_Samal_0-1591045077007.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E2.%20In%20Display%20form%20It%20works%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Vikram_Samal_1-1591045158607.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F195826i64D11205FC43F308%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Vikram_Samal_1-1591045158607.png%22%20alt%3D%22Vikram_Samal_1-1591045158607.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E3.Finally%20Display%20Form%20formula%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Vikram_Samal_2-1591045249036.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F195827iB2631426A98CD90E%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Vikram_Samal_2-1591045249036.png%22%20alt%3D%22Vikram_Samal_2-1591045249036.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EBut%20you%20can%20use%20power-apps%20that%20will%20give%20you%20this%20feature.%26nbsp%3B%26nbsp%3BIf%20I%20could%20help%20to%20find%20the%20solution%2C%20please%20like%20or%20mark%20the%20answer%20as%20solution.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3EVik%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1433250%22%20slang%3D%22en-US%22%3ERe%3A%20MC211640%3A%20Conditionally%20show%20or%20hide%20columns%20in%20a%20SharePoint%20list%20or%20library%20form%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1433250%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F56193%22%20target%3D%22_blank%22%3E%40Laurent%20SITTLER%3C%2FA%3E%26nbsp%3B%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F394813%22%20target%3D%22_blank%22%3E%40Vikram_Samal%3C%2FA%3E%26nbsp%3Bhas%20a%20good%20idea%20on%20the%20Power%20Apps%20form%20to%20show%2Fhide.%20Here's%20a%20great%20article%20from%20Nate%20Chamberlain%20on%20how%20to%20accomplish%20this%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fnatechamberlain.com%2F2019%2F07%2F18%2Fshow-hide-fields-conditionally-in-powerapps-forms-based-on-dropdown-selection%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fnatechamberlain.com%2F2019%2F07%2F18%2Fshow-hide-fields-conditionally-in-powerapps-forms-based-on-dropdown-selection%2F%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1433599%22%20slang%3D%22en-US%22%3ERe%3A%20MC211640%3A%20Conditionally%20show%20or%20hide%20columns%20in%20a%20SharePoint%20list%20or%20library%20form%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1433599%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F56193%22%20target%3D%22_blank%22%3E%40Laurent%20SITTLER%3C%2FA%3E%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F394813%22%20target%3D%22_blank%22%3E%40Vikram_Samal%3C%2FA%3E%26nbsp%3B%3A%20The%20formula%20works%2C%20This%20is%20not%20work%20on%20click%20event%20you%20need%20to%20save%20the%20form%20completed%20in%20order%20to%20work%20this%20formula.%3C%2FP%3E%3CP%3EFor%20example%2C%20Region%20selection%2C%20I%20want%20to%20show%2Fhide%20Finished%20Goods%20Notification%20column%3C%2FP%3E%3CP%3E1)%20Condition%3A%20if%20Region%20%3D%20US%2C%20hide%20Finished%20Goods%20Notification%20else%20show%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Ashish_Kohale_0-1591109433170.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F195916iFB725A4A44919C7D%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Ashish_Kohale_0-1591109433170.png%22%20alt%3D%22Ashish_Kohale_0-1591109433170.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E2)%20Click%20on%20edit%20item%2C%20change%20the%20region%20to%20US.%3C%2FP%3E%3CP%3E3)%20Then%20click%20save%20in%20save%20form.%3C%2FP%3E%3CP%3E4)%20Open%20the%20form%20and%20Display%20mode%2C%20see%20below%20screenshot%20Finished%20Goods%20gets%20hidden.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Ashish_Kohale_1-1591109772372.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F195917i862B12B8DA6E07EF%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Ashish_Kohale_1-1591109772372.png%22%20alt%3D%22Ashish_Kohale_1-1591109772372.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E5)%20then%20open%20the%20form%20in%20Edit%20mode%2C%20here%20also%20Finished%20Goods%20Notification%20column%20is%20hidden.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Ashish_Kohale_2-1591109856270.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F195918iD4695C94A507ABA8%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Ashish_Kohale_2-1591109856270.png%22%20alt%3D%22Ashish_Kohale_2-1591109856270.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E6)%20I%20wrote%20the%20formula%20on%20Finished%20Goods%20Notification%20column%20as%20below%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Ashish_Kohale_3-1591110010477.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F195920i787F4D37D81091E2%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Ashish_Kohale_3-1591110010477.png%22%20alt%3D%22Ashish_Kohale_3-1591110010477.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1433622%22%20slang%3D%22en-US%22%3ERe%3A%20MC211640%3A%20Conditionally%20show%20or%20hide%20columns%20in%20a%20SharePoint%20list%20or%20library%20form%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1433622%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F56193%22%20target%3D%22_blank%22%3E%40Laurent%20SITTLER%3C%2FA%3E%26nbsp%3B%3A%20Of%20course%20PowerApps%20is%20the%20ultimate%20solution%20to%20design%20form%20and%20apply%20formulas.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1433828%22%20slang%3D%22en-US%22%3ERe%3A%20MC211640%3A%20Conditionally%20show%20or%20hide%20columns%20in%20a%20SharePoint%20list%20or%20library%20form%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1433828%22%20slang%3D%22en-US%22%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F664791%22%20target%3D%22_blank%22%3E%40Ashis%3C%2FA%3E%20when%20I%20was%20referring%20that%20you%20can%E2%80%99t%20use%20it%20in%20new%20form%20and%20edit%20form%2C%20I%20am%20referring%20to%20click%20event.%20As%20hide%20and%20show%20solution%20does%20not%20suffice%20all%20the%20aspects%20of%20a%20solution%20rather%20a%20partial%20one%20so%20that%E2%80%99s%20the%20challenge.%20On%20the%20other%20hand%20power%20apps%20being%20the%20better%20complete%20solution.%20Finally%20when%20you%20use%20the%20formula%20while%20you%20are%20in%20edit%20form%20and%20new%20form%20also%20it%20do%20not%20allow%20you%20to%20save%20giving%20me%20the%20error%20where%20as%20in%20display%20form%20it%20allows.%20Do%20you%20experience%20it%20differently.%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%3CBR%20%2F%3EVik%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1434127%22%20slang%3D%22en-US%22%3ERe%3A%20MC211640%3A%20Conditionally%20show%20or%20hide%20columns%20in%20a%20SharePoint%20list%20or%20library%20form%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1434127%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F394813%22%20target%3D%22_blank%22%3E%40Vikram_Samal%3C%2FA%3E%26nbsp%3B%3A%20Its%20working%20for%20me%20on%20Edit%20and%20Display%20form%20as%20per%20the%20steps%20mentioned%20by%20me%20in%20earlier%20screenshots.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20per%20the%20microsoft%20standard%20step%20mentioned%20in%20the%20link%20also%20given%20by%20the%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F56193%22%20target%3D%22_blank%22%3E%40Laurent%20SITTLER%3C%2FA%3E%26nbsp%3B----%26gt%3B%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fdeclarative-customization%2Flist-form-conditional-show-hide%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fdeclarative-customization%2Flist-form-conditional-show-hide%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3ENote%3A%3C%2FSTRONG%3E%20Check%20the%20second%20step%2C%20it%20says%20%3CU%3EOpen%20an%20item%20to%20view%20the%20item%20details%20in%20the%20display%20form%3C%2FU%3E.%3C%2FP%3E%3CP%3ESo%20in%20order%20to%20imbibe%20the%20formula%20you%20have%20to%20follow%20as%20per%20given%20standard%20steps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20show%20or%20hide%20a%20column%20in%20a%20list%20or%20library%20form%3A%3C%2FP%3E%3COL%3E%3CLI%3E%3CP%3EGo%20to%20the%20list%20or%20library%20for%20which%20you%20want%20to%20show%20or%20hide%20columns%20in%20the%20form.%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EIf%20you%20are%20in%20a%20list%3A%3C%2FP%3E%3CUL%3E%3CLI%3EOpen%20an%20item%20to%20view%20the%20item%20details%20in%20the%20display%20form.%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3CLI%3E%3CP%3EIf%20you%20are%20in%20a%20document%20library%3A%3C%2FP%3E%3CUL%3E%3CLI%3ESelect%20a%20file.%3C%2FLI%3E%3CLI%3EIn%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EInformation%20Pane%3C%2FSTRONG%3E%3A%3CUL%3E%3CLI%3ELocate%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EProperties%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Esection.%3C%2FLI%3E%3CLI%3EClick%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EEdit%20all%3C%2FSTRONG%3E.%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3CLI%3E%3CP%3EAt%20the%20top%20of%20the%20form%2C%20select%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EEdit%20Form%20%26gt%3B%20Edit%20columns%3C%2FSTRONG%3E.%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EIn%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EEdit%20columns%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Epane%2C%20check%20(to%20show)%20or%20uncheck%20(to%20hide)%20the%20box%20for%20the%20column%20or%20columns%20as%20needed.%3C%2FP%3E%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3ENote%3A%3C%2FSTRONG%3E%20PowerApps%20is%20the%20best%20solution%20to%20implement%20this%20functionality%2C%20this%20way%20you%20can%20show%2Fhide%20fields%20on%20click%2Fchange%20of%20dropdown%20values.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1434243%22%20slang%3D%22en-US%22%3ERe%3A%20MC211640%3A%20Conditionally%20show%20or%20hide%20columns%20in%20a%20SharePoint%20list%20or%20library%20form%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1434243%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F679665%22%20target%3D%22_blank%22%3E%40Ashish_Kohale%3C%2FA%3E%26nbsp%3BI%20hope%20this%20is%20the%20last%20conversation%20%3A)%3C%2Fimg%3E%20for%20this.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAre%20you%20able%20to%26nbsp%3B%3CSPAN%3Ehide%20and%20show%20columns%20on%20the%20basis%20of%20selection%2Fupdate%20of%20values%20in%20New%20or%20Edit%20Form%20(intent%20to%20do%20a%20real%20time%20evaluation%20of%20parent%20column%20and%20then%20show%20and%20hide%20of%20child%20column%20).%20If%20your%20answer%20is%20%22yes%22%20then%20that%20is%20not%20happening%20for%20me%20and%20for%20me%20that%20is%20a%20show%20stopper%20for%20me.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThanks%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EVik%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-1435158%22%20slang%3D%22en-US%22%3ERe%3A%20MC211640%3A%20Conditionally%20show%20or%20hide%20columns%20in%20a%20SharePoint%20list%20or%20library%20form%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1435158%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F394813%22%20target%3D%22_blank%22%3E%40Vikram_Samal%3C%2FA%3E%26nbsp%3B%3A%20Yes%20I%20understood%20yours%20query%20totally.%20All%20I%20wanted%20to%20say%20the%20formula%20is%20working%20but%20not%20on%20real%20time%20value%20changes(which%20I%20have%20explained%20pretty%20in%20my%20earlier%20post%20with%20screenshots)%2C%20it%20takes%20effect%20only%20after%20saving%20the%20value.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20real%20time%20evaluation%20needs%20to%20have%20page%20load%20event%20or%20ready()%20function%20like%20as%20in%20JavaScript%2FJQuery.%20I%20think%20the%20conditional%20formula%20intended%20to%20work%20only%20after%20value%20gets%20saved%20in%20database.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOnce%20you%20apply%20formula%20on%20specific%20column%20to%20which%20you%20want%20to%20show%2Fhide%20based%20on%20value%20of%20another%20column.%20And%20then%20create%20New%20item%2Cselect%20column%20value%20based%20on%20show%20and%20hide%20of%20another%20column%20and%20then%20save%20the%20item%20and%20open%20the%20same%20item%20again%2C%20the%20formula%20working%20on%20both%20display%2Fedit%20form.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20order%20to%20work%20this%20in%20real%20time%20we%20need%20to%20customize%20the%20form%20with%20PowerApps%2C%20where%20we%20can%20get%20more%20controls%20to%20apply%20such%20condition.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIts%20really%20awesome%20such%20tech%20community%20where%20we%20get%20to%20know%20various%20people%20and%20discuss%20with%20them.%20It%20gives%20us%20opportunity%20to%20Share%20and%20Learn.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20You.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1469103%22%20slang%3D%22en-US%22%3ERe%3A%20MC211640%3A%20Conditionally%20show%20or%20hide%20columns%20in%20a%20SharePoint%20list%20or%20library%20form%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1469103%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F394813%22%20target%3D%22_blank%22%3E%40Vikram_Samal%3C%2FA%3E%2C%20thank%20you%20for%20your%20answer.%3CBR%20%2F%3EI%20understand%20that%20Power%20Apps%20is%20the%20solution%20to%20create%20custom%20form%20but%20I%20had%20hope%20that%20SharePoint%20could%20have%20a%20simple%20feature%20like%20this%20because%20the%20formula%20is%20available%20for%20the%20edit%20mode%20too.%3C%2FP%3E%3CP%3EIt%20is%20complicate%20to%20explain%20to%20the%20final%20users%20that%2C%20yes%20you%20have%20a%20conditional%20formula%20but%20no%20it%20does%20not%20work%20like%20that.%3C%2FP%3E%3CP%3ECreate%20a%20Power%20Apps%20for%20a%20simple%20use%20case%20like%20this%20one%20is%20pretty%20huge%20(potentially%20with%20authorizations%2C%20licences%20and%20external%20sharing).%3CBR%20%2F%3EAnyway%2C%20it%20is%20noted.%20That%20you%20for%20your%20time%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

After several attempts to operate a conditional field on item form, the formula still invalid.

The use case is the following one:

  • 1 column Provider, type Choice with 2 values
  • 2 other columns msProducts and pnpProducts, type Choice
  • When the provider is equals to Microsoft, the column msProducts should appear
  • From the default SP form, click on Edit form > Edit columns > (Ellipsis on msPorducts) > Edit conditional formula
  • The tested formulas with invalid condition are:
    1. =if([$Provider]=='Microsoft', 'true', 'false') : formula suggested by the official documentation https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/list-form-conditional-show...
    2. =if([Provider]=='Microsoft', 'true', 'false')
    3. =if(Provider=='Microsoft', 'true', 'false')
The same tests are performed by replacing '==' by '=' and by removing the simple quote around true & false
  • This formula is valid but does not work
    1. =if(@Provider=='Microsoft', 'true', 'false')

The conditional formula is not functional currently or something is wrong?

9 Replies
Highlighted
Solution

@Laurent SITTLER As far I have tested this function only works in the display form not in Edit or New Form. Even they don't allow to save the formula as real time evaluation of fields are not happening.

See the below screen shots: 1. New Form:

Vikram_Samal_0-1591045077007.png

2. In Display form It works:

Vikram_Samal_1-1591045158607.png

3.Finally Display Form formula:

Vikram_Samal_2-1591045249036.png

But you can use power-apps that will give you this feature.  If I could help to find the solution, please like or mark the answer as solution.

 

Thanks

Vik

 

Highlighted

Hi @Laurent SITTLER , @Vikram_Samal has a good idea on the Power Apps form to show/hide. Here's a great article from Nate Chamberlain on how to accomplish this: https://natechamberlain.com/2019/07/18/show-hide-fields-conditionally-in-powerapps-forms-based-on-dr...

Highlighted

@Laurent SITTLER@Vikram_Samal : The formula works, This is not work on click event you need to save the form completed in order to work this formula.

For example, Region selection, I want to show/hide Finished Goods Notification column

1) Condition: if Region = US, hide Finished Goods Notification else show

Ashish_Kohale_0-1591109433170.png

2) Click on edit item, change the region to US.

3) Then click save in save form.

4) Open the form and Display mode, see below screenshot Finished Goods gets hidden.

Ashish_Kohale_1-1591109772372.png

5) then open the form in Edit mode, here also Finished Goods Notification column is hidden.

Ashish_Kohale_2-1591109856270.png

6) I wrote the formula on Finished Goods Notification column as below:

Ashish_Kohale_3-1591110010477.png

 

@Laurent SITTLER : Of course PowerApps is the ultimate solution to design form and apply formulas. 

Highlighted
@Ashis when I was referring that you can’t use it in new form and edit form, I am referring to click event. As hide and show solution does not suffice all the aspects of a solution rather a partial one so that’s the challenge. On the other hand power apps being the better complete solution. Finally when you use the formula while you are in edit form and new form also it do not allow you to save giving me the error where as in display form it allows. Do you experience it differently.

Thanks
Vik
Highlighted

@Vikram_Samal : Its working for me on Edit and Display form as per the steps mentioned by me in earlier screenshots.

 

As per the microsoft standard step mentioned in the link also given by the @Laurent SITTLER ----> https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/list-form-conditional-show...

 

Note: Check the second step, it says Open an item to view the item details in the display form.

So in order to imbibe the formula you have to follow as per given standard steps.

 

To show or hide a column in a list or library form:

  1. Go to the list or library for which you want to show or hide columns in the form.

  2. If you are in a list:

    • Open an item to view the item details in the display form.
  3. If you are in a document library:

    • Select a file.
    • In the Information Pane:
      • Locate the Properties section.
      • Click Edit all.
  4. At the top of the form, select Edit Form > Edit columns.

  5. In the Edit columns pane, check (to show) or uncheck (to hide) the box for the column or columns as needed.

 

Note: PowerApps is the best solution to implement this functionality, this way you can show/hide fields on click/change of dropdown values.

 

Highlighted

@Ashish_Kohale I hope this is the last conversation :) for this.

 

Are you able to hide and show columns on the basis of selection/update of values in New or Edit Form (intent to do a real time evaluation of parent column and then show and hide of child column ). If your answer is "yes" then that is not happening for me and for me that is a show stopper for me.

 

Thanks

Vik

 

 

Highlighted

@Vikram_Samal : Yes I understood yours query totally. All I wanted to say the formula is working but not on real time value changes(which I have explained pretty in my earlier post with screenshots), it takes effect only after saving the value. 

 

The real time evaluation needs to have page load event or ready() function like as in JavaScript/JQuery. I think the conditional formula intended to work only after value gets saved in database.

 

Once you apply formula on specific column to which you want to show/hide based on value of another column. And then create New item,select column value based on show and hide of another column and then save the item and open the same item again, the formula working on both display/edit form.

 

In order to work this in real time we need to customize the form with PowerApps, where we can get more controls to apply such condition.

 

Its really awesome such tech community where we get to know various people and discuss with them. It gives us opportunity to Share and Learn. 

 

Thank You.

Highlighted

Hi @Vikram_Samal, thank you for your answer.
I understand that Power Apps is the solution to create custom form but I had hope that SharePoint could have a simple feature like this because the formula is available for the edit mode too.

It is complicate to explain to the final users that, yes you have a conditional formula but no it does not work like that.

Create a Power Apps for a simple use case like this one is pretty huge (potentially with authorizations, licences and external sharing).
Anyway, it is noted. That you for your time :)