Iterate and append result - but nothing back

Hello Dmitry

Sorry for this simple question:

I need to call a 'modul' to work with parameters using the eval() function, since eval() doesn't support field entries.

Now I'm calling the calculation with iteration and parameter passing, but I'm not getting anything back.

What do I need to do?

Attached is an example with three variations, but still nothing.

I'm using EasyMorph 5.9.7.29

With my best regards
Reini

Definition_of_how_holidays_are_calculated -Test_2.xlsx (9,0 KB)

Holiday Test_2.morph (11,5 KB)

Hello,

for normal holidays in Germany, you could use this free API and it works fine (even for region specific holidays).

https://github.com/bundesAPI/feiertage-api

For other countries, Iwould give this one a try:

Hello

Thank you for these two links.

I have (Swiss/cantonal and municipal) holidays and events that need to be treated as holidays or not.

When I download them here, I get (Swiss and cantonal) information, which is good.

However, the specific, sometimes subtle differences, and certainly not the minor municipal/regional variations, are missing.

Therefore, I created a list with all the relevant information so I can calculate everything myself using formulas.

This way, I don't have to check everything every year.

That's why it would be very helpful for me to know how I can perform the calculation using the `eval()` function with iteration.

Regards Reini

Hello @Jochen and @Dmitry

If I first create a "pseudo column" and then action "calculate new column", then `eval()` works because the action "calculate new column" is executed; otherwise, it doesn't!

Why?

With my best regards

Reini

Just add the “Input” action at first position of the module.

Then, all dates will be calculated:

Hello @Jochen_Marquardt

With my “Pseudo-Column” run this one time !

With your “Input” run’s all two times !

Hi,

Add a filter in the module and filter by a new Parameter which selects the according holiday

Hi @Reini ,

If I first create a "pseudo column" and then action "calculate new column", then `eval()` works because the action "calculate new column" is executed; otherwise, it doesn't!

Why?

To answer this specific question: the Calculate New Column action runs once for every row of the input dataset; it does not create new rows. So if it is the only action in the table, no rows will be produced. However, if there is a 'pseudo column' (basically any existing row), you will get a result.

Hi @vlad_dzhos

OK - Now I understand for this topic with “Calculate New Column”.

If there's no row, it doesn't calculate or create anything.

Thanks, Vlad.

Hi @Jochen_Marquardt

II implemented your suggestion, and it works for both "Iterate table" examples, but not for the first "Iterate" example.

I've attached the modified file "Holiday Test_3.morph".

See the results in the images. The question is, why?

Definition_of_how_holidays_are_calculated -Test_2.xlsx (9,0 KB)

Holiday Test_3.morph (13,7 KB)