Leave days calculation

I have 2 data tables and they are connected with a reference property.
The tables named:

  • Employee - Containing a.o. total leave days when starting the job
  • Leave - Containing a.o. the leave request in days and days left after leave

What I am trying to do is to create a calculation:
days left after leave = total leave days - leave request in days
All property’s are numbers.

Please support and correct me since i cannot figure it out:

Flow Part
I created 3 inputs, for each property one
The I created a calculation based on the property that belongs to the input
(days left after leave = total leave days - leave request in days)
And as output i have chosen the name I gave the calculation.

User Flow
Created a table with a calculation button that is connected to the above flow part and after that a update flowpart.

Nothing changes in the table, what am i doing wrong?

Hi @g.tinnetje,

To check why nothing changes in the table, I had to take a look specifically at your design. I think that what happens is correct, though unexpected :slight_smile:

The first time that you calculate the value, something does change. You store the remainder of the free days in a separate field, called Leave after approval (Verlofdagen na keuring).

Every subsequent time you perform the calculation, it will get the same inputs, and the same output, which you then store in this same field. So the field never changes any more.

What I think you want to do, is update this value to a different field, that you use as input for your flow part. The field Leave days (Verlof Dagen). That way, every time you click the button to calculate the new value, this value will decrease.

I hope this helps, please let us know if there is more to it or if this was not exactly the problem.

Dear Jesse,

Many thanks for taking a look into my design, much appreciated.
I think that I found the problem. In the user flow, I probably forgot to select the calculation in the update flow part after I updated the calculation. Something in that direction :slight_smile: .

But it works now, again many thanks.

1 Like