Hello, I need some help.
I have a nested gallery.
I create a grid of 12x31 (372)fields for my yearly calendar. (month and days)
It looks like this:
(Attached Image)
(purple&green= vacation | red = sick | yellow = holiday | gray = weekend)
I want to collect the data of the Txt_Abwesenheit_Unit.Text of each field and store it as JSON() to my sharepoint list.
I struggle with the collection. The nested gallery doesn't store as flat table, but as a table containing table data,
making it impossible for me to create a JSON() string.
The ultimate goal is to save the input via button (patch) and saving it into list of employees, to track their vacation time and else.
I need it like this, because I'm going to reference the JSON() data for further usage. (Shift planning e.g. ) and I want to store multiple years.
Outer gallery contains month and numbers:
[{Monat:"Januar";Nummer:1};{Monat:"Februar";Nummer:2};
{Monat:"März";Nummer:3};{Monat:"April";Nummer:4};
{Monat:"Mai";Nummer:5};{Monat:"Juni";Nummer:6};
{Monat:"July";Nummer:7};{Monat:"August";Nummer:8};
{Monat:"September";Nummer:9};{Monat:"Oktober";Nummer:10};
{Monat:"November";Nummer:11};{Monat:"Dezember";Nummer:12}]
Inner gallery contains a sequence for days:
ForAll(
Sequence(31);
{
Tag: Value;
Monat: ThisItem.Monat;
MonatsNummer: Text(ThisItem.Nummer; "00")
}
)
This is a simlyfied version of my collection code:
ClearCollect(
colCalendarData;
ForAll(
Gal_Abwesenheit_Monate.AllItems;
ForAll(
ThisRecord.Gal_Abwesenheit_Tage.AllItems;
{
D: Date(Drp_Urlaub_Jahr.Selected.Value;Value(ThisRecord.MonatsNummer);ThisRecord.Tag);
C: ThisRecord.Txt_Abwesenheit_Unit.Text
}
)
)
)
The issue is, it's not generating flat table:
it creates Value:[Table]