Hi,
Date order, if the field is empty, it is not displayed after sorting. I would like the empty fields to be at the beginning of the column in Data Table.
This 'onselect on icon 'Set(sort_var,"In_Date");UpdateContext({SortDescending1: !SortDescending1})
This 'item in Data Table 'SortByColumns(Filter('OF',nev_keres_input_text.Text in Név), sort_var, If( SortDescending1, Descending, Ascending ) )
Thank you in advance for your help...
Solved! Go to Solution.
Hi @BiTry
Do you want to put the record with empty date column in the first row of the table?
I think the only way is to store the sorted items (Null record at the top) to the new collection, then display it in the table.
You can try to put the following codes to OnSelect of the Sort button, when click it, it will create a new collection that sorts as your expectation.
Set(
sort_var,
"Date"
);
UpdateContext({SortDescending1: !SortDescending1});
ClearCollect(
myGalleryCollection,
Filter(
'1117',
Date = Blank()
)
);
Collect(
myGalleryCollection,
SortByColumns(
Filter(
'1117',
Date <> Blank()
),
sort_var,
If(
SortDescending1,
Descending,
Ascending
)
)
I have made a test for your reference:
Best Regards,
Levi
Hi @BiTry
Do you want to put the record with empty date column in the first row of the table?
I think the only way is to store the sorted items (Null record at the top) to the new collection, then display it in the table.
You can try to put the following codes to OnSelect of the Sort button, when click it, it will create a new collection that sorts as your expectation.
Set(
sort_var,
"Date"
);
UpdateContext({SortDescending1: !SortDescending1});
ClearCollect(
myGalleryCollection,
Filter(
'1117',
Date = Blank()
)
);
Collect(
myGalleryCollection,
SortByColumns(
Filter(
'1117',
Date <> Blank()
),
sort_var,
If(
SortDescending1,
Descending,
Ascending
)
)
I have made a test for your reference:
Best Regards,
Levi
THX! Work:)