cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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!

 

 

Screenshot - 6_12_2017 , 3_21_49 PM.pngChecking in with camera barcode scanner and manual input of student ID. Which gets pushed to confirmation screen, where Im getting the error.Screenshot - 6_12_2017 , 3_12_33 PM.pngError showing up.Screenshot - 6_12_2017 , 3_20_01 PM.pngMy data table

2 ACCEPTED SOLUTIONS

Accepted Solutions
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 ) ), {CheckedOutToSmiley FrustratedtudentIDnumOut.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 ) ), {CheckedOutToSmiley FrustratedtudentIDnumOut.Text}); Navigate(HomeScreen,Fade)

 

View solution in original post

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 ) ), {CheckedOutToSmiley FrustratedtudentIDnumOut.Text,Date:Today(),Time:Text( Now(), "[$-en-US]hh:mm:ss" )})

 

View solution in original post

7 REPLIES 7
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 ) ), {CheckedOutToSmiley FrustratedtudentIDnumOut.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 ) ), {CheckedOutToSmiley FrustratedtudentIDnumOut.Text}); Navigate(HomeScreen,Fade)

 

View solution in original post

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

 

 

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 ) ), {CheckedOutToSmiley FrustratedtudentIDnumOut.Text,Date:Today(),Time:Text( Now(), "[$-en-US]hh:mm:ss" )})

 

View solution in original post

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?

Anonymous
Not applicable

Re: Asset Management App

I figured out the bug, thanks again!

Highlighted
Krishna_v
Level: Power Up

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

 

MarkLagan
Level: Powered On

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
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Demo Extravaganza Championship Voting Open

Voting Ends: October 30, 2019!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 189 members 4,918 guests
Please welcome our newest community members: