Hi,
I'm trying to generate a list of parking places based on a range.
From the string "S1.01-S1.28", I generate a table ["S1.01"; "S1.02"; ... ; "S1.28"].
This works well...
However, I'm trying to do the same thing for "S1.01-1.43" and the last item ("S1.43") is missing, I can't figure out why.
Here is my code:
Clear(tempCollection);;
Clear(tempCollectionCurrent);;
ForAll(
["S1.01-S1.28"] As range; // //"D1.01-D1.43
With(
{
rangeParts: Split(
Substitute(
range.Value;
".";
","
);
"-"
)
};
With(
{
min: Value(
Right(
First(rangeParts).Value;
Len(First(rangeParts).Value) - 1
)
);
max: Value(
Right(
Last(rangeParts).Value;
Len(First(rangeParts).Value) - 1
)
)
};
Notify($"min: {min}; max: {max}");;
RemoveIf(tempCollectionCurrent; true);;
ForAll(
Sequence(
Abs(min-max)*100 + 1;
min;
0,01
) As diff;
Collect(
tempCollectionCurrent;
Concatenate("D";
Substitute(
Left(
Concatenate(
diff.Value;
"0"
);
4
);
",";
"."
)
)
);;
Notify(
Substitute(
Left(
Concatenate(
diff.Value;
"0"
);
4
);
",";
"."
)
);;
)
)
);;
Collect(
tempCollection;
{
places:tempCollectionCurrent
}
);;
)