cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Andries
Level: Powered On

Using drop down selections to create a table

Good Day 

 

I have created 4 drop down lists connected to a Database. 

 

The purpose of this is to have users select the starting day of the month 'DropdownDays' and the month itself 'DropdownMonths'. I have done the same with the end of the month 'DropdownDays_end' and 'DropdownMonth_end'. I want to use those submissions to generate a interactive table or such showing all the dates from the 'DropdownDays' & 'DropdownMonths' to the end. The purpose is for the user then to select if he was present that day or on aunual leave such. 

 

The purpose of this is for time and attendance between the 21th and the 20th of the next month. 

 

I am not sure if it will be better to just ask the user to select days that he was off from a calender and then assign the type of leave to the selections. 

 

Open to suggestions 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Using drop down selections to create a table

Hi @Andries,

 

Could you please share a bit more about your scenario?

Could you please show more details about your data source?

Further, do you want to display all dates between two different dates?

 

If you want to display all dates between two differen dates, please take a try with the following workaround:3.JPG

 

Set the OnVisible property of the first screen of my app to following formula:

ClearCollect(DaysCollection,["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"])

 

 

Set the Items property of the DropdownMonths  Dropdown control and DropdownMonth_end Dropdown control to following formula:

 

["01","02","03","04","05","06","07","08","09","10","11","12"]

Set the Items property of the DropdownDays Dropdown control and DropdownDays_end Dropdown control to following formula:

["01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"]

Set the OnSelect property of the "Retrieve" button to following formula:

Clear(RetrievedDates);
ForAll(
FirstN(DaysCollection,DateDiff(Date(Value(Text(Today(),"[$-en-US]yyyy")),Value(DropdownMonths.Selected.Value),Value(DropdownDays.Selected.Value)),Date(Value(Text(Today(),"[$-en-US]yyyy")),Value(DropdownMonth_end.Selected.Value),Value(DropdownDays_end.Selected.Value)))+1),
Collect(
RetrievedDates,
DateAdd(Date(Value(Text(Today(),"[$-en-US]yyyy")),Value(DropdownMonths.Selected.Value),Value(DropdownDays.Selected.Value)),Value(Value))
)
)

Set the Items property of the Data table control to following formula:

RetrievedDates

The GIF image as below:Test1.gif

 

 

 

 

Best regards,

Kris

 

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Using drop down selections to create a table

Hi @Andries,

 

Could you please share a bit more about your scenario?

Could you please show more details about your data source?

Further, do you want to display all dates between two different dates?

 

If you want to display all dates between two differen dates, please take a try with the following workaround:3.JPG

 

Set the OnVisible property of the first screen of my app to following formula:

ClearCollect(DaysCollection,["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"])

 

 

Set the Items property of the DropdownMonths  Dropdown control and DropdownMonth_end Dropdown control to following formula:

 

["01","02","03","04","05","06","07","08","09","10","11","12"]

Set the Items property of the DropdownDays Dropdown control and DropdownDays_end Dropdown control to following formula:

["01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"]

Set the OnSelect property of the "Retrieve" button to following formula:

Clear(RetrievedDates);
ForAll(
FirstN(DaysCollection,DateDiff(Date(Value(Text(Today(),"[$-en-US]yyyy")),Value(DropdownMonths.Selected.Value),Value(DropdownDays.Selected.Value)),Date(Value(Text(Today(),"[$-en-US]yyyy")),Value(DropdownMonth_end.Selected.Value),Value(DropdownDays_end.Selected.Value)))+1),
Collect(
RetrievedDates,
DateAdd(Date(Value(Text(Today(),"[$-en-US]yyyy")),Value(DropdownMonths.Selected.Value),Value(DropdownDays.Selected.Value)),Value(Value))
)
)

Set the Items property of the Data table control to following formula:

RetrievedDates

The GIF image as below:Test1.gif

 

 

 

 

Best regards,

Kris

 

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,351)