cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Asset Management App

Hi All,

 

I'm currently working on an asset management app for my organization. The example app has helped with the initial design and some funtionality. The main purpose of this app is to keep track of the assets we have and tie them to a user. Unlike the example they will only be using the asset for a short period of time, not days. The example app is a little too elaborate and I just need the very basics. I've been reading the documentation pages and im having trouble with a couple things, specifically the data integration. I pretty much have the app designed, I just need to link the fields to the excel sheet which is where im having trouble. On the example app, everything is done with forms and is pushed to the excel sheet with the submit form function. The way i designed the app doesnt use forms, it uses the text boxes, as shown.

 

I read that the patch function should be able to edit the table or add to the table but Ive been getting this error message "Invalid argument type (text). Expecting a Record value instead." Im confused to what I have to put on the second argument for the BaseRecordTable. Does this look correct? Should I convert the text boxes to forms? I want to update the table and not aggregate rows with data being repeated, ie asset id being duplicated. What do you guys recommend? Thanks!

 

 

Checking in with camera barcode scanner and manual input of student ID. Which gets pushed to confirmation screen, where Im getting the error.Checking in with camera barcode scanner and manual input of student ID. Which gets pushed to confirmation screen, where Im getting the error.Error showing up.Error showing up.My data tableMy data table

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Anonymous
Not applicable

Re: Asset Management App

Hi @Anonymous

 

This page might help you a lot: https://powerapps.microsoft.com/en-us/tutorials/function-patch/

 

You have some sintax errors in your Patch function.

 

Try this:

Patch(TransOut,First( Filter( TransOut, AssetTag = AssetOut.Text ) ), {CheckedOutTo:StudentIDnumOut.Text})

This code:

First( Filter( TransOut, AssetTag = AssetOut.Text ) )

Will check the excel sheet to match the AssetTag with the inputed AssetOut so that the correct row of Excel will update

 

EDIT: also run the Patch() before the Navigate(). So the full forumla for the button is this:

Patch(TransOut,First( Filter( TransOut, AssetTag = AssetOut.Text ) ), {CheckedOutTo:StudentIDnumOut.Text}); Navigate(HomeScreen,Fade)

 

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Asset Management App

Hi @Anonymous

 

You can get todays date by using

Today()

function and you can get the exact time by using

Text( Now(), "[$-en-US]hh:mm:ss" )

So the Patch function would look like this:

Patch(TransOut,First( Filter( TransOut, AssetTag = AssetOut.Text ) ), {CheckedOutTo:StudentIDnumOut.Text,Date:Today(),Time:Text( Now(), "[$-en-US]hh:mm:ss" )})

 

View solution in original post

7 REPLIES 7
Highlighted
Anonymous
Not applicable

Re: Asset Management App

Hi @Anonymous

 

This page might help you a lot: https://powerapps.microsoft.com/en-us/tutorials/function-patch/

 

You have some sintax errors in your Patch function.

 

Try this:

Patch(TransOut,First( Filter( TransOut, AssetTag = AssetOut.Text ) ), {CheckedOutTo:StudentIDnumOut.Text})

This code:

First( Filter( TransOut, AssetTag = AssetOut.Text ) )

Will check the excel sheet to match the AssetTag with the inputed AssetOut so that the correct row of Excel will update

 

EDIT: also run the Patch() before the Navigate(). So the full forumla for the button is this:

Patch(TransOut,First( Filter( TransOut, AssetTag = AssetOut.Text ) ), {CheckedOutTo:StudentIDnumOut.Text}); Navigate(HomeScreen,Fade)

 

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Asset Management App

Thanks so much Martynas that makes sense,

 

It looks like its working, I appreciate your help. Is there a way to add the time and date of when continue is pressed and patch gets executed? Thanks

 

 

Highlighted
Anonymous
Not applicable

Re: Asset Management App

Hi @Anonymous

 

You can get todays date by using

Today()

function and you can get the exact time by using

Text( Now(), "[$-en-US]hh:mm:ss" )

So the Patch function would look like this:

Patch(TransOut,First( Filter( TransOut, AssetTag = AssetOut.Text ) ), {CheckedOutTo:StudentIDnumOut.Text,Date:Today(),Time:Text( Now(), "[$-en-US]hh:mm:ss" )})

 

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Asset Management App

Thanks Again Martynas,

 

The time and date code was correct. But now the CheckedOutTo column isnt being filled in. Very strange, I checked to make sure everything was spelled correctly. Anything you can think of?

Highlighted
Anonymous
Not applicable

Re: Asset Management App

I figured out the bug, thanks again!

Highlighted
New Member

IT Asset Management

Hi All,

 

I want to implement IT Asset Tracker(Like Hardware,Softwar) using Powerapps ,but i am new to this powerapps ,so can you please help me how to do custom PowerApps ,what we need.

 

Regards,

Krishna

 

Highlighted
Frequent Visitor

Re: IT Asset Management

Hi , planning to make one also, kindly notify me if ever you already found a good tutorial for this kind ! Thanks 

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,532)