Calculation question

R

RDB

I'm hoping there's an InfoPath guru who can point me in the right direction
here. Here's what I have and what I'd like to accomplish.

I'm trying to set up a form to track how my employees spend their time. For
each day of the week I have the workday broken down into quarter hour
increments (7:00-7:15, for example). Each quarter hour can either be blank,
or an item can be selected from a pulldown. For this example, let's call
those items "Project A", "Project B", and "Project C."

If the employee spends the 7:00-7:15 segment working on "Project A," I would
like to count this towards the number of hours spent on Monday on (a) that
specific project and (b) towards the total time spent on projects A, B, and C
together. I have an Excel formula that accomplishes this by counting empty
cells, multiplying this number by .25, then subtracting this from the number
from the number of total hours in the work day. Translating this to InfoPath
isn't as easy. The Excel formula is: =10-(COUNTIF(B$3:B$42,"")*0.25)

If anyone could give me a headstart...or provide an ideal way to accomplish
this, I would appreciate it. Thanks!
 
B

Ben Hamlin

..25 * count(<xpath to parent of all the dropdowns>/node()[text() != ""]
or
10 - .25 * count(<xpath to parent of all the dropdown>/node()[text()=""]

that might take some tweaking depending how your xml is structured. Whats
important is that you get an expath to all the dropdowns, and then filter it
by their value (the part in []s). That returns a node-set...and count() just
counts it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top