Jabert Posted February 21, 2018 Share Posted February 21, 2018 I am stumped. I am constructing an app that requires tracking a participants' attendance over a rolling period of 5 weeks. Each person is assigned a day of the week for their attendance. The criteria are that a person is withdrawn if his or her attendance is fewer than 2 times in any 5 week period. For example: for Mondays in the period of 1 January through 28 February: if a person misses January 1st, 8th and 29th, they are withdrawn from eligibility, if a person misses January 8th, and 22nd and February 5th they are withdrawn from eligibility I a person misses January 1st, 15th and February 12th, they remain eligible. Any help will be greatly appreciated. Link to comment Share on other sites More sharing options...
Jabert Posted February 22, 2018 Author Share Posted February 22, 2018 I am stumped. I am constructing an app that requires tracking a participants' attendance over a rolling period of 5 weeks. Each person is assigned a day of the week for their attendance. The criteria are that a person is withdrawn if his or her attendance is fewer than 2 times in any 5 week period. For example: for Mondays in the period of 1 January through 28 February: if a person misses January 1st, 8th and 29th, they are withdrawn from eligibility, if a person misses January 8th, and 22nd and February 5th they are withdrawn from eligibility I a person misses January 1st, 15th and February 12th, they remain eligible. Any help will be greatly appreciated. Link to comment Share on other sites More sharing options...
Techphan Posted February 22, 2018 Share Posted February 22, 2018 As always, solving this problem depends upon a lot of variables that you, the programmer, control. One solution is to create a portal of attendance dates (or absences - depending if you are counting classes attended or missed) on a student layout (form). Create a starting date in a global start date field, which can automatically populate an ending global date. and use those dates in the attendance definition (old-timer's way in creating portal definition) or to filter the portal (newer method). Count the number of records in the portal and you have the information you need. Link to comment Share on other sites More sharing options...
doughemi Posted February 23, 2018 Share Posted February 23, 2018 See if this helps. Note that it does not take into account holidays; you will have to massage the lastFiveSessions field to accommodate. jabert.fmp12 Link to comment Share on other sites More sharing options...
doughemi Posted February 23, 2018 Share Posted February 23, 2018 Added buttons to drive scripts to make it easier to understand jabert.fmp12 Link to comment Share on other sites More sharing options...
Josh Ormond Posted February 23, 2018 Share Posted February 23, 2018 Here is a calculation that will give you the date from 5 weeks ago. You feed it the assigned day. I laid this out to show you the steps in the calculation to arrive at the answer. There are other more efficient ways to get the same answer, but this should get you going. Let ( [ aDate = Date ( 1 ; 1 ; 2017 ) ; aDayNumber = DayOfWeek ( aDate ) ; assignedDay = "Tuesday" ; assignedDayNumber = Substitute ( assignedDay ; [ DayName ( aDate ) ; 1 ] ; [ DayName ( aDate + 1 ) ; 2 ] ; [ DayName ( aDate + 2 ) ; 3 ] ; [ DayName ( aDate + 3 ) ; 4 ] ; [ DayName ( aDate + 4 ) ; 5 ] ; [ DayName ( aDate + 5 ) ; 6 ] ; [ DayName ( aDate + 6 ) ; 7 ] ) ; todayDate = Get ( CurrentDate ) ; todayDayNumber = DayOfWeek ( todayDate ) ; dateOffset = ( todayDayNumber - assignedDayNumber ) ; endDate = Case ( dateOffset >= 0 ; todayDate - dateOffset ; todayDate - dateOffset - 7 ) ; startDate = endDate - ( 5 * 7 ) ] ; startDate ) aDate is just a date I know is Sunday to calculate the day value we need for the rest of the calculation. 1 Link to comment Share on other sites More sharing options...
Jabert Posted February 23, 2018 Author Share Posted February 23, 2018 Sorry to say that my level of expertise is insufficient to understand your suggestion. I cannot see how to adapt it to my app. I may not have been clear enough in my original post. What is needed is a way to display a warning in a persons' record. This would be used to generate a weekly delinquency list. I am attaching a copy of my app containing data for the month of January. Record number 1294 is an example of a record that should generate a warning message. I had in mind utilizing six fields (Monday through Saturday - they are not open on Sundays) each containing a value of 1 or zero, and representing Monday through Saturday results. In the beginning, all fields would be set to 0). Each week the value of these fields would stay at 1 (if the person attended, or would be set to 0 if they did not. The idea was to have a sixth field containing the total of the five fields and, when the total was less than 3, a message would appear showing that that person was now eliminated from participation. Also the value of the sixth field would set the persons' status from “Active” to “Withdrawn”. HoY App.fmp12.zip Link to comment Share on other sites More sharing options...
Josh Ormond Posted February 23, 2018 Share Posted February 23, 2018 My suggestion gives you the date that covers the past 5 weeks based on whatever day is their assigned day. From there you need to look at the records to see what days they missed ( or were in attendance ). I don't have the bandwidth to look at your file at the moment. Did you look at @doughemi's sample?! Link to comment Share on other sites More sharing options...
doughemi Posted February 23, 2018 Share Posted February 23, 2018 @Jabert: Your attachment is corrupted. Please re-zip your file and re-post. Link to comment Share on other sites More sharing options...
Jabert Posted February 23, 2018 Author Share Posted February 23, 2018 I am having trouble accessing my account. The administrators are working on this, I will get back to you when the problem is cleared up. Link to comment Share on other sites More sharing options...
Jabert Posted February 23, 2018 Author Share Posted February 23, 2018 I still have no access, but apparently, I can send. So attached is another copy of the file HoY_App.fmp12.zip Link to comment Share on other sites More sharing options...
R MacLANE Posted February 23, 2018 Share Posted February 23, 2018 Your file is corrupt! Please make sure there are no spaces in the filename, like this "Hoy_App.fmp12.ZIP" and resend. And if you had no access you would NOT be able to POST ANYTHING! If that does not work put it on Dropbox or somewhere. Link to comment Share on other sites More sharing options...
R MacLANE Posted February 23, 2018 Share Posted February 23, 2018 3 hours ago, Jabert said: my level of expertise is insufficient to understand your suggestion. I can It also sounds like you need a developer to complete this...I would suggest Messaging Doug or Josh. We are here to help you as much as we can but we are not here to build your solution or it's most difficult parts. Link to comment Share on other sites More sharing options...
Jabert Posted February 23, 2018 Author Share Posted February 23, 2018 I corrected the name of the file and resent it to Doughemi. Until I get my access restored there is not much else to do bu wait. Thanks for your interest. Link to comment Share on other sites More sharing options...
R MacLANE Posted February 24, 2018 Share Posted February 24, 2018 You have access now ...otherwise you would not be able to respond like you are currently doing or even see your question. Try uploading your file to DROPBOX. There is nothing else that can be done on this end. I think a need a Martini! Link to comment Share on other sites More sharing options...
Josh Ormond Posted February 24, 2018 Share Posted February 24, 2018 What access are you referring to? To login? Or to access the attached files? Link to comment Share on other sites More sharing options...
Jabert Posted February 24, 2018 Author Share Posted February 24, 2018 Forgot to mention that the layout called Line by Line has all the January data entered. If there is a "1" in the P/U field it means the pickup for that date was made; if there is a blank it means that person missed his/her pickup for that date. Link to comment Share on other sites More sharing options...
Jabert Posted February 24, 2018 Author Share Posted February 24, 2018 Access to your responses to me...hope it is fixed now Link to comment Share on other sites More sharing options...
Jabert Posted February 25, 2018 Author Share Posted February 25, 2018 IF YOU A HoY_App.fmp12.zip Link to comment Share on other sites More sharing options...
Jabert Posted February 25, 2018 Author Share Posted February 25, 2018 If you are still interested, her is the latest copy with most, if not all, of the scripts working Thanks for your interest Link to comment Share on other sites More sharing options...
Recommended Posts