You are viewing limited content. For full access, please sign in.

Question

Question

Sum drop down column using formula

asked on February 3, 2021

I have a drop down field in a table. There are three choices: Full Day, Half Day, None. To these choices I have assigned numeric values:1.0, 0.5, and 0. I would like to sum the column using a formula, but I can get it to work.

Any suggestions?

Note:  The calculation is outside of the table.

I also have a column that is single line that needs to be summed. I can get this one to work, so I am assuming the problem with the drop down is either a reference problem or a value problem. 

 

0 0

Answer

SELECTED ANSWER
replied on May 17, 2021

The update worked. It now calculates for me using formulas.

0 0

Replies

replied on February 3, 2021 Show version history

How exactly is it not working? Are you getting no value at all, an error, or just the wrong value?

I just tested to confirm and the function should be relatively simple

=SUM(Table.Column)

Where you might run into problems with incorrect values is if you're using a numeric field that doesn't have enough decimal places allowed so it rounds, but other than that it should work.

2 0
replied on February 4, 2021

I tried it like that initially. It wouldn't work, so I tried a variety of other scenarios. Just tried it again like you showed above, still nothing. 

I just made a new form and tried it separately from the form I was working on...same thing.

Obviously it worked for you, so maybe it is a glitch somewhere. I will have someone higher up check it out.

0 0
replied on February 4, 2021 Show version history

Not working how? No value, wrong value, etc.

Specifics really help in narrowing things down.

0 0
replied on February 18, 2021

I did the same thing prior to asking the question, but I am still not getting a result. 

I tried it again, just to be sure. 

Here is my formula: =SUM(Timesheet.Per_Diem_Day) . I pulled the variables out of the list to avoid typing errors.

Here are the choices. 

Here is a preview of the section in the form.

I put in a single line to see if the values were coming through. They are in the single line, but not in the number field. Tried to add VALUE to the formula, but that didn't work either.

As another test for the number field, I changed it to =Timesheet.Per_Diem_Day. This pulls the first value.

 

0 0
replied on February 18, 2021

Which version of Forms are you running?

0 0
replied on February 18, 2021

Laserfiche Forms Professional Version 10.4.1.164

0 0
replied on February 18, 2021

This is an edit of an older form that would have been created in an earlier version. That shouldn't matter, should it?

0 0
replied on February 18, 2021 Show version history

Our test environment is on 10.4.5.282 so I just tested in our production environment (10.4.1.164) and was able to reproduce the issue there.

I skimmed the release notes and didn't see anything mentioning this specifically so I don't know which update fixed it, but it does look like it was a bug.

If you need a workaround until you can update (the jump to 10.4.5 is pretty big because there's a couple substantial changes) you can do this:

  1. Add an additional Number column to your table (with 1 decimal place)
  2. Set the Number calculation as =INDEX(Timesheet.Per_Diem_Day,ROW())
  3. SUM the Number column instead of the dropdown
  4. Set a Field Rule to always hide the number column

 

This basically just copies the dropdown value into the number field, then sums those fields instead of the dropdown to get around whatever bug is causing the problem.

1 0
replied on February 19, 2021

Well, I am glad you were able to replicate the issue. I was starting to think it was me! I've sent a request to IT to update. I will update this posting once I confirm it worked.

Thank you, Jason. You have been very helpful.

0 0
SELECTED ANSWER
replied on May 17, 2021

The update worked. It now calculates for me using formulas.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.