Nursing activity score to appsheet

Hi!
I’m trying to build an app to calculate the Nurse Activity Score.
This score is the sum of several variables (colums).
Most of the colums are enumlist or true/false type columns.
Depending on the answer given for each variable, a value (decimal number) must be assigned to that variable,
The idea is to get a total score that would be the sum of all the values assigned to the variables.

For example, the variable [monitoring] can be given 3 possible answers -----> number:
normal ----> number 4.5
more than normal .------> 12.1
much more than normal ------> 19.6

I’ve been trying with ifs function and ifs(in function but couldn’t get the syntaxis righ.
Can anyone help with a detailed way to write this formula?

Thanks!
Cecilia

0 5 794
5 REPLIES 5

Bahbus
New Member

The easiest way to pull this off would be to completely flip your data. Because long IFS statements will slow down the app significantly.

I would have a Questions, AnswerType, Answer, and Score column. The Question column obviously contains the questions text. You could use the AnswerType column to programmatically differentiate what type of answer is needed. You Answer column would then be setup to check AnswerType to verify the correct possibilities. And last the Score column can compute a numerical store. From there you could just use SUM to gather all the scores.

If you also want all the nurses answers, you’ll need a more complex setup. But as a straight calculator the above approach would probably be the best, easiest, and fastest way to get it working the way you described.

I think I get what you mean.
So question, answertype, answer and score woul all be columns of the same table?
I don’t think I know how to validate a column with the values of another one.

What method would you suggest for score to computer the numerical value?

Sorry if I ask to a basic of a question…I’m a newbie at this!

Steve
Platinum 4
Platinum 4

Thanks Steve!
So I have this expression now
IFS(
TRUE, “MONITOREO NORMAL” :4.5
[TRUE, “MONITOREO MAS DE LO NORMAL” : 12.1]
[TRUE, “MONITOREO MUC*HO MAS DE LO NORMAL” :19.6]
)
And it seems to be valid.
But when I update the interface, the field where you are supposed to input one of these three options appears to be already completed with the first one.
It´s like que field is being automatically updated by the formula or somethin?

If your expression is in fact as you’ve provided it above:

IFS(
TRUE, “MONITOREO NORMAL” :4.5
[TRUE, “MONITOREO MAS DE LO NORMAL” : 12.1]
[TRUE, “MONITOREO MUC*HO MAS DE LO NORMAL” :19.6]
)

it’s no wonder it doesn’t work as it isn’t structured properly to do anything worthwhile.

If you haven’t done so already, I strongly encourage you to spend some time learning about expressions and reviewing some of the examples in the documentation. Start here:

In my previous reply, I included a link to the help page for the IFS() function. If you look at the examples there, you’ll see that your expression is quite different.

I suspect the following is closer to what you want:

IFS(
  ("normal" = [monitoring]),
    4.5,
  ("more than normal" = [monitoring]),
    12.1,
  ("much more than normal" = [monitoring]),
    19.6
)

Or you could instead use a SWITCH() expression:

SWITCH(
  [monitoring],
  "normal",
    4.5,
  "more than normal",
    12.1,
  "much more than normal",
    19.6,
  ""
)
Top Labels in this Space