locked
Use xPath to help filter multiple choice drop downs RRS feed

  • Question

  • I have a multiple choice drop down column I would like to filter with a 'does NOT contain' clause.
    I have read that a calculated column might help with this.
    In my infoPath form I use xPath to concatenate the multiple choices into a string:

    xdMath:Eval(xdMath:Eval(/dfs:myFields/dfs:dataFields/my:SharePointListItem_RW/my:REQUESTING_x0300_BUREAU_x0300__x/Value, 'concat(., ", ")'), "..")

    It concatenates the choices with a comma between them. It seems like this technology should help somehow with the filtering problem. Calculate columns in Sharepoint do not seem to accept xPath.

    Any Ideas?

    Thanks


    GreenCapitalist

    Friday, September 27, 2019 9:28 PM

Answers

  • Hi GreenCapitalist, 

    This limitation is by design. We can neither make use of multiple choice field in a calculated column nor we can make use of the OOB Column filter "do not contain" option on a multiple choice field. 

    I am sorry to say that there is no OOTB method to  achieve your requirement. 

    Best Regards, 

    Lisa Chen 



    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Wednesday, October 2, 2019 8:30 AM

All replies

  • Hi GreenCapitalist, 

    I am not very understanding of your requirement. 

    What do you want to achieve?

    Filter the data that is displayed in a control for your reference:

    https://support.office.com/en-us/article/filter-the-data-that-is-displayed-in-a-control-7c9471ed-46e6-40fc-93b6-8f25e5fa4deb

    Best Regards, 

    Lisa Chen 


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.


    Monday, September 30, 2019 9:18 AM
  • Lisa,
    Thank you for that link. I looks intriguing.
    However I am working on a view in sharepoint. I am able to show records that contain 'art' for instance.
    I want to show all records that do contain 'art' but do not contain 'art-deco'. There is no 'not contain' filter available for sharepoint views.
    Creating a calulated column can be a work around for negative filtering. But SharePoint doesn't allow calculated columns for that kind of a field (multiple choice).
    Peter

    GreenCapitalist

    Monday, September 30, 2019 2:24 PM
  • Hi GreenCapitalist, 

    This limitation is by design. We can neither make use of multiple choice field in a calculated column nor we can make use of the OOB Column filter "do not contain" option on a multiple choice field. 

    I am sorry to say that there is no OOTB method to  achieve your requirement. 

    Best Regards, 

    Lisa Chen 



    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Wednesday, October 2, 2019 8:30 AM