Infopath Formula Filter

Posted on 2009-02-18
Last Modified: 2012-05-06
Hello, I am trying to create a formula that filters data to not show up in the results.  Below is the code that is written but the option to add more than one filter does not seem to work.

sum(../dfs:dataFields/d:EmployeeInfo/d:VacationInfo/@Hours[../@Type_Vacation != "Vacation" or "Floating Holiday"])

Can someone suggest another option to try.
Question by:mrdesignit
    LVL 8

    Expert Comment

    I would put two seperate conditions in one rule. One for if it equals vacation and the other if it equals Flotating Holiday instead of having the or within your formula itself.
    LVL 1

    Author Comment

    how would the code look on something like this.  Sorry for the delay the project went on hold and now I am back on it.
    LVL 1

    Accepted Solution

    Figured it out, the problem was with the code = "Vacation" or "Floating Holiday".  The formula would not work unless the word translate was part of the formula.  Example....

    sum(@hours[translate(../@Type_Vacation, "Vacation", "Floating Holidays")])

    Not sure if that makes since, but it worked to return a sum of two different conditions.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
    Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now