Silvestru Posted July 3, 2018 Posted July 3, 2018 Hello Forum, This is a bit of a cop-out but I have a task and I really don't even know where to start with this so after like 6 hours of thinking I wanted to ask for your opinion. We have an office and more people than free desks (20 people 18 desks) so we have to make an file where people can mark if they go on vacation or they work from home so the two (unfortunate) new members will know where they can sit. So for example if I am sitting in desk 3 and I am on vacation on 3'rd of July I can mark the 3'rd desk as blue so when the 2 members open the file they will know mine is free. The challenge comes when thinking how to link this with a calendar. It's pretty inefficient to create 30 tabs for each day every month. My idea was to have a calendar, and when you click on a date, you see the situation for that specific date. So my question for you if if you can help me link the two or find a easier way than creating 360 tabs for each day of the year. Thank you very much and I am willing to do the dishes for the person who helps me for one month!
fiveworlds Posted July 3, 2018 Posted July 3, 2018 Would it not be better to use a server for that so people can simply load the website and mark whether they are working from home? Quote My idea was to have a calendar, and when you click on a date, you see the situation for that specific date. So my question for you if if you can help me link the two or find a easier way than creating 360 tabs for each day of the year. You could use an excel macro for it. https://www.excel-easy.com/vba.html 1
Endy0816 Posted July 3, 2018 Posted July 3, 2018 You can dynamically change cell color based on its value(which will depend on the free tables for the day selected). https://www.ablebits.com/office-addins-blog/2013/10/18/change-background-color-excel-based-on-cell-value/#change-background-dynamically So when the user clicks on March 3rd, Excel checks who is off that day, then using another table with seat assignments, changes the correct desks' cell value and thus their color. 1
Sensei Posted July 3, 2018 Posted July 3, 2018 (edited) But why do it in Excel? Would not be better to make PHP script generating HTML form, which will send the all data what users clicked to cental server, which will store it in some file/database (and eventually inform about conflict).. ? Here is my rough start of such script: tables_main.php <html> <body> <form method="post" action="tables_process.php"> <table> <?php $index = 1; for( $row = 1; $row <= 6; $row++ ) { printf( "<tr>\r\n" ); for( $col = 1; $col <= 3; $col++ ) { printf( "<td><input name=\"Seat$index\" type=\"checkbox\" />Seat $index</td>\r\n" ); $index++; } printf( "</tr>\r\n" ); } ?> </table> <input type="submit" value="Send it!" /> </form> </body> </html> tables_process.php <?php foreach( $_POST as $key => $value ) { printf( $key . " " . $value . "<br>" ); // They will start with "Seat".. } ?> The first script is making 18 seats-checkbox in HTML form.. Second one script is showing which checkboxes are set.. Edited July 3, 2018 by Sensei 1
Silvestru Posted July 3, 2018 Author Posted July 3, 2018 1 hour ago, Sensei said: But why do it in Excel? Would not be better to make PHP script generating HTML form, which will send the all data what users clicked to cental server, which will store it in some file/database (and eventually inform about conflict).. ? Haha because I am a noob at scripts. Thank you very much all of you, I ended up making it through a calendar template in SharePoint. It does the deed for now so I will use it temporarily but I am paying very close attention on this thread for the future scheme.
Sensei Posted July 3, 2018 Posted July 3, 2018 1 minute ago, Silvestru said: Haha because I am a noob at scripts. To become master in scripting/programming (or anything else) somebody needs to have reasons to master it..
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now