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

help for a beginner to build a basic in out board canvas app

Hi all,

 

A complete Canvas app beginner here. I wanted to start with a small canvas app project for our company so people could add their location status, but am a bit lost where to begin, so any advice would be appreciated.

 

What I want is on app start page:

  • Displays current user
  • Drop down list with options "at office", "working from home", "on leave"
  • Date/time input where the user can record the date and time they will be due back in the office
  • Navigation option to a second page to show the location of other staff, maybe with a search box to find the user. (we have about 90 staff, so may need a paging method or something)

I have some limited experience with model driven apps and dataverse, so I don't mind if the data is stored in a sharepoint list or dataverse.

 

If anyone can give some pointers on how to start that would be great.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous_Hippo
Super User
Super User

Hello @sossie07   , 

To get started  I would recommend watching this video by Reza

https://www.youtube.com/watch?v=aVEaRpAlaTA

 

and referring to Mathew Devaney's blog (which is an awesome place- definitely deserves a bookmark )

https://www.matthewdevaney.com/10-things-you-should-know-about-power-apps-forms/

 

I think by following reza's video you will learn :-

  • how to create and use galleries to navigate to an item
  • How to work with form controls

    No getting back to your question. Below are my recommendations:-

    • Displays current user- use the following function for the simplest way to get the current user's name User().FullNameDrop down list with options "at office", "working from home", "on leave" -You can either create a SharePoint choice column or Dataverse choice column for the same
    • Date/time input where the user can record the date and time they will be due back in the office - similarly you can create a Date and time column
    • Navigation option to a second page to show the location of other staff, maybe with a search box to find the user. (we have about 90 staff, so may need a paging method or something) - you can use navigation, search or filter to do the same

https://www.youtube.com/watch?v=3S0h2nODcxM (this is a good way for navigation)

 

Hope this helps !

 

Cheers !!!

 

---
Please click "Accept as Solution" if this post answered your question so that it is helpful for people having similar questions. If you found this post helpful consider giving it a "Thumbs Up." Thanks !!

View solution in original post

9 REPLIES 9
Anonymous_Hippo
Super User
Super User

Hello @sossie07   , 

To get started  I would recommend watching this video by Reza

https://www.youtube.com/watch?v=aVEaRpAlaTA

 

and referring to Mathew Devaney's blog (which is an awesome place- definitely deserves a bookmark )

https://www.matthewdevaney.com/10-things-you-should-know-about-power-apps-forms/

 

I think by following reza's video you will learn :-

  • how to create and use galleries to navigate to an item
  • How to work with form controls

    No getting back to your question. Below are my recommendations:-

    • Displays current user- use the following function for the simplest way to get the current user's name User().FullNameDrop down list with options "at office", "working from home", "on leave" -You can either create a SharePoint choice column or Dataverse choice column for the same
    • Date/time input where the user can record the date and time they will be due back in the office - similarly you can create a Date and time column
    • Navigation option to a second page to show the location of other staff, maybe with a search box to find the user. (we have about 90 staff, so may need a paging method or something) - you can use navigation, search or filter to do the same

https://www.youtube.com/watch?v=3S0h2nODcxM (this is a good way for navigation)

 

Hope this helps !

 

Cheers !!!

 

---
Please click "Accept as Solution" if this post answered your question so that it is helpful for people having similar questions. If you found this post helpful consider giving it a "Thumbs Up." Thanks !!

sossie07
Helper II
Helper II

Thanks very much for your help.

 

I have it all working except for one thing...

I have a date colum in my list that I use to store the date for "due back in the office". I'm using patch(filter()) to update the status of the user in the sharepoint list.

 

Problem is that if the person is in the office, I want it to clear the "due back in the office" date colum in the list. I can't work out how to do this.

I've tried doing this:

Patch(inandoutboard,
First(Filter(inandoutboard,Title=User().FullName)),
{
Title: User().FullName,
Location: radio1.Selected.Value,
'Due back in the office': Blank()

}),

 

Problem is that Blank() does not appear to over wirte the date that is currently in the date column.

 

How can I do this?

 

Thanks,

@sossie07  Can you check if you Formula-level error management to ON, in Settings. If not switch it on and try . It should work !

 

Cheers

sossie07
Helper II
Helper II

Thanks that fixed that issue.

 

I have one more though if you could help again please.

 

With my Filter Patch function (see below) I have found that if the user does not exist in the list it does not create an entry for the user. If I put in a user manually from then on it will patch it. How can I make my code more efficient so that if the user does not exist it creates a record for that person?

 

Patch(inandoutboard,
First(Filter(inandoutboard,Title=User().FullName)),
{
Title: User().FullName,
Location: radio1.Selected.Value,
'Due back in the office': Blank()

}),

I am not 100 % sure what you are trying to do but the below code create a new record in your DB if it does not find a title=username . Hopefully this is what you wanted 🙂

Can you please try this...

If(
    IsBlank(
        Filter(inandoutboard,Title=User().FullName)
        ),
        Patch(inandoutboard,
        Defaults(inandoutboard),
            {Title: User().FullName,
            Location: radio1.Selected.Value,
            'Due back in the office': Blank()
}
),Patch(inandoutboard,
First(Filter(inandoutboard,Title=User().FullName)),
{
Title: User().FullName,
Location: radio1.Selected.Value,
'Due back in the office': Blank()

})

 

sossie07
Helper II
Helper II

Thanks for that.

What I'm trying to acheive is for "onSelect" property of a button either

  1. creates a new sharepoint list record if doesnt already exist. 
  2. update an existing sharepoint list record if it does already exist. 

I can get both of these patch options to work indivudually with a button each, but not from the same button.

@sossie07  I understand what you are trying to do now 🙂  can you try this

 

If(
    IsBlank(
        lookup(inandoutboard,Title=User().FullName)
        ),
        Patch(inandoutboard,
        Defaults(inandoutboard),
            {Title: User().FullName,
            Location: radio1.Selected.Value,
            'Due back in the office': Blank()
}
),Patch(inandoutboard,
lookup(inandoutboard,Title=User().FullName),
{
Title: User().FullName,
Location: radio1.Selected.Value,
'Due back in the office': Blank()

})

 

If this does not work . Could you please tell me if the OnSelect button has some other code ? Also when you click on it does it give you some kind of error?

 

Thanks

sossie07
Helper II
Helper II

Thanks very much for your help all working now!

Are function names case sensitive in PowerApps? If so that is my problem.

No where did I read that function names were case sensitive in powerapps. Was some fluke that I was getting most of it going, but had the wrong case for LookUP

Cheers

Awesome ! @sossie07  . Sorry for that, i forgot about that 🙂 I wrote the formula here that's why it was lowercase

 

Cheers !! 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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