Display data in dynamic choice
I have an Audits table with a choice dynamic field called dates (I want it to be an array of days).
I have a Setting table with two choice fields: Year (2025 2026 .....) and Month (Jan, Feb ....)
I want the dates field to automatically populate with all the days corresponding to that month and year in Audits. table
If select 2025 Oct in choice dynamic field view all date of this month
5 replies
-
Do you have a formula field that separates year and month from the date field? Something like where you create two formula fields called auditYear and auditMonth.
So you can search the Audit table like you want.
-
Hi Rafael. If you have normal choice fields for month and year, you could use them for the following script for a dynamic multiple choice field or dynamic choice field. Now you have all days of selected month and year in this field for choice. Mirko
let monthValue := number(MonthChoiceField); let yearValue := number(text(YearChoiceField)); if monthValue and yearValue then let caption := range(number(date(yearValue, monthValue, 1)), number(date(yearValue, monthValue + 1, 0)) + 86400000, 86400000); for i in range(cnt(caption)) do let object := {}; setItem(object, "id", i + 1); setItem(object, "caption", format(date(item(caption, i)), "ddd DD.MM.YY")); object end else [{}] end
-
let monthValue := number(MonthChoiceField);
let yearValue := number(text(YearChoiceField));
if monthValue and yearValue then
let result := range(number(date(yearValue, monthValue, 1)), number(date(yearValue, monthValue + 1, 0)) + 86400000, 86400000);
let caption := for i in result do
if weekday(i) < 5 then i end
end;
for i in range(cnt(caption)) do
let object := {};
setItem(object, "id", i + 1);
setItem(object, "caption", format(date(item(caption, i)), "ddd DD"));
object
end
else
[{}]
end
Content aside
- Status Answered
- yesterdayLast active
- 5Replies
- 36Views
-
3
Following