# Help needed - employees access

**URL:** https://community.glideapps.com/t/help-needed-employees-access/18956
**Category:** Ask for Help
**Created:** [November 26, 2020, 3:27pm UTC](https://community.glideapps.com/t/help-needed-employees-access/18956 "2020-11-26T15:27:33Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Gideon\_Lahav\_Busines](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gideon_lahav_busines/32/41121_2.png) [@Gideon\_Lahav\_Busines](https://community.glideapps.com/u/Gideon_Lahav_Busines)
#### Post date: [November 26, 2020, 3:27pm UTC](https://community.glideapps.com/t/help-needed-employees-access/18956/1 "2020-11-26T15:27:33Z")

</div>

Are these possible?

Options for employees:

1. Employee login password - each one has his/her own (I know how it with an email address, but I want to add a password as well)
2. The employee will be able to upload an image only during the set working hours.
3. The employee will not have access to the application out of office hours.
4. Delete images from the app 24 hours after uploading them (storage).
5. make sure images are in high resolution.

Thanks for repaying those

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [November 26, 2020, 4:05pm UTC](https://community.glideapps.com/t/help-needed-employees-access/18956/2 "2020-11-26T16:05:55Z")

</div>

> [@Gideon\_Lahav\_Busines](#):
>
> Employee login password - each one has his/her own

Probably this can be done with a public app. I imagine having a user-specific field for entering password and a template + relation combination to check if the entered email + password is existing in the data.

> [@Gideon\_Lahav\_Busines](#):
>
> The employee will be able to upload an image only during the set working hours.

You can have two fixed time column in the Sheet, let’s say it contains 09:00 and 17:00, then a math column inside Glide with the format set to time only. Show the image picker only when the “now” time is after 09:00 and before 17:00.

> [@Gideon\_Lahav\_Busines](#):
>
> The employee will not have access to the application out of office hours.

Use the same strategy above, don’t show the password field when it’s outside of office hours.

> [@Gideon\_Lahav\_Busines](#):
>
> Delete images from the app 24 hours after uploading them (storage).

You would need a script to do this, and make sure you catch the timestamp when users upload an image, via a form.

> [@Gideon\_Lahav\_Busines](#):
>
> make sure images are in high resolution.

We have no control over this.

---

<div class="post-metadata">

### Author: ![Gideon\_Lahav\_Busines](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gideon_lahav_busines/32/41121_2.png) [@Gideon\_Lahav\_Busines](https://community.glideapps.com/u/Gideon_Lahav_Busines)
#### Post date: [November 26, 2020, 4:10pm UTC](https://community.glideapps.com/t/help-needed-employees-access/18956/3 "2020-11-26T16:10:42Z")

</div>

> [@ThinhDinh](#):
>
> , via a form.

All are very clear, except:

You would need a script to do this, and make sure you catch the timestamp when users upload an image, via a form.

Any Idea where to find such a script? I guess you mean to delete rows right?

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [November 26, 2020, 4:12pm UTC](https://community.glideapps.com/t/help-needed-employees-access/18956/4 "2020-11-26T16:12:00Z")

</div>

Yes, I would have an arrayformula to calculate a trigger. Something like if original + timestamp \> now then true.

Use the trigger on every row that returns a true value.

---

<div class="post-metadata">

### Author: ![Drearystate](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/drearystate/32/49605_2.png) [@Drearystate](https://community.glideapps.com/u/Drearystate)
#### Post date: [November 26, 2020, 5:56pm UTC](https://community.glideapps.com/t/help-needed-employees-access/18956/5 "2020-11-26T17:56:57Z")

</div>

You could actually just use the now function in a cell and format it for time. Then glide did a visibility for the action that will not show the button to add pictures or files if that number is greater or less than.  
You would need a script for sure to delete the files but I guess the question is does it need to be 24 hours or just at the end of the day.

Ok, so here’s a script that should work to remove after they are a day old, just change sheet name and column reference.

```
function ClearAfter24() {
var ssActive = SpreadsheetApp.getActiveSpreadsheet();
    SpreadsheetApp.setActiveSheet(getSheetByName('Sheet1'))
var MyRange = ssActive.getRange("A:A");//selects column A
var ADayAgo = new Date(date.getTime()-(24*3600*1000));
for(i = 0; i < MyRange.length; i++) {
    if(MyRange[i].getTime()<ADayAgo){
        getActiveSheet().deleteRow(i);
    }
}
}

```

Something else to note, you can just add a multiplier to the beginning of the time identifier to change the day count, a example of this would be if you wanted it to be a week instead of a day the 5th line would simply read:

```
var ADayAgo = new Date(date.getTime()-7*(24*3600*1000));
```

---

<div class="post-metadata">

### Author: ![Gideon\_Lahav\_Busines](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gideon_lahav_busines/32/41121_2.png) [@Gideon\_Lahav\_Busines](https://community.glideapps.com/u/Gideon_Lahav_Busines)
#### Post date: [November 26, 2020, 8:11pm UTC](https://community.glideapps.com/t/help-needed-employees-access/18956/6 "2020-11-26T20:11:59Z")

</div>

Wow, thank you so much guys, super helpful!!

@Drearystate & @ThinhDinh you are the best (😁
