Custom Functions

icon picker
Table Functions

Last edited 118 days ago by MyCondy
Text inside "<>" character should be replaced by your real data.

Create row index in a list

ClearCollect(collectIndexedQuestions, AddColumns(Filter(<TABLE>,Period = Year(Now())), "RowNumber", 0));
UpdateIf(collectIndexedQuestions, RowNumber=0, {
RowNumber: Last(SortByColumns(collectIndexedQuestions, "RowNumber",SortOrder.Ascending)).RowNumber + 1
})

Clear selected row number index

ClearCollect(collectIndexedQuestions, AddColumns(Filter(<TABLE>,Period = Year(Now())), "RowNumber", 0));
ClearCollect(Cust,AddColumns(Customers As SP, "myIndex",CountRows(Filter(<TABLE2>, ID <= SP.ID))))

Show list of days by month name

ForAll(Sequence(DateDiff(Date(Year(Now()), Switch(<LABEL TEXT>.Text,
"January", 1,"February", 2, "March",3,"April",4,"May",5), 1), DateAdd(DateAdd(Date(Year(Now()), Switch(<LABEL TEXT>.Text,
"January", 1,"February", 2, "March",3,"April",4,"May",5), 1), 1, "Months"), -1, "Days"), "Days")+1), Text(Date(Year(Now()), Switch(<LABEL TEXT>.Text,
"January", 1,"February", 2, "March",3,"April",4,"May",5), Value),"ddd dd"))


Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.