cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

HotDesk pickup

Hi Team

 

I been asked to create an app for yesterday (Yea i know we all been there).

It should assign a desk to a user in a specific office.

So i thought I will create a sharepoint table with columns DeskNumber, OfficeCode, AssignedUser

Column DeskNumber will store Desk 1, Desk 2, Desk 3

OfficeCode will store short codes like Lon, Bri, Liv

AssignedUser will store "empty" name by default or it will store user who have been given a desk on that day. I will pickup user name from "Office 365 Users" connector

 

I want it make simple just drop down menu to choose office and then button "Pick up a desk"

 

Mine only problem is the main formula which will assign first available desk to a user or will refuse as he already got assigned desk.

 

Any thoughts please?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: HotDesk pickup

Hi @m0le ,

Do you want to build an app to update your sharepoint list?

Based on your description, I made a similar test for your reference:

1)create a sharepoint table with columns DeskNumber(choice type), OfficeCode(choice type), AssignedUser(person type)

 

2)in powerapps, insert three combo boxes for these three columns

combo box1's Items:

Choices(listname.DeskNumber)

combo box2's Items:

 

Choices(listname.OfficeCode)

 

combo box3's Items:

 

Choices(listname.AssignedUser)

 

//please replace listname with your listname

529.PNG

 

3)set the submit button's OnSelect:

If(
   IsEmpty(Filter(listname,AssignedUser.Email=combobox3.Selected.Email)),
   Patch(listname,Defaults(listname),
                  {DeskNumber:combobox1.Selected, OfficeCode:combobox2.Selected, AssignedUser:combobox3.Selected}
          ),
   Notify("This user has already been assigned desk!",NotificationType.Warning)
)

 

 

Then if that user has no desk, you will update data. If that user has already been assigned desk, you will get a warning.

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: HotDesk pickup

Hi @m0le ,

Do you want to build an app to update your sharepoint list?

Based on your description, I made a similar test for your reference:

1)create a sharepoint table with columns DeskNumber(choice type), OfficeCode(choice type), AssignedUser(person type)

 

2)in powerapps, insert three combo boxes for these three columns

combo box1's Items:

Choices(listname.DeskNumber)

combo box2's Items:

 

Choices(listname.OfficeCode)

 

combo box3's Items:

 

Choices(listname.AssignedUser)

 

//please replace listname with your listname

529.PNG

 

3)set the submit button's OnSelect:

If(
   IsEmpty(Filter(listname,AssignedUser.Email=combobox3.Selected.Email)),
   Patch(listname,Defaults(listname),
                  {DeskNumber:combobox1.Selected, OfficeCode:combobox2.Selected, AssignedUser:combobox3.Selected}
          ),
   Notify("This user has already been assigned desk!",NotificationType.Warning)
)

 

 

Then if that user has no desk, you will update data. If that user has already been assigned desk, you will get a warning.

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

Highlighted
Helper II
Helper II

Re: HotDesk pickup

This looks awesome, thank you 
I just change my conception little bit  instead of SharePoint table I am using excel table. 
How the submit bottom should look like in case of excel please?

Highlighted
Helper II
Helper II

Re: HotDesk pickup

Ok I manage to convert it to excel version but again big Thanks to you as you manage to direct me to such simple solution 

If(
   IsEmpty(Filter([@Table3],UserID=UserIDVariable)),
   SubmitForm(EditForm1),
   Notify("This user has already been assigned desk!",NotificationType.Warning)
)

 

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (8,251)