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.
Error showing up.
My data table
Solved! Go to Solution.
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)
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" )})
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)
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
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" )})
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?
I figured out the bug, thanks again!
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
Hi , planning to make one also, kindly notify me if ever you already found a good tutorial for this kind ! Thanks
User | Count |
---|---|
253 | |
248 | |
82 | |
45 | |
28 |
User | Count |
---|---|
344 | |
260 | |
123 | |
60 | |
58 |