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

Inventory notification

Greetings all - 

I've modified the the Asset Checkout template to reserve quantities of items based on user input from a Text Input field. What I'd like is to display a warning if if they request an amount greater than what is currently on stock. 

The data is coming from a datafield called "Quantity" in my Excel sheet. I'm brand new to this, so if someone is feeling extra helpful and breakdown the formula for a dunce like me, I'd be very grateful. 

21 REPLIES 21
Highlighted
Resolver III
Resolver III

Re: Inventory notification

Hi Logani,

 

You could create a Label and have the text to show "**WARNING MESSAGE**". Then on the "Visible" function of the label you could do something like:

 

#Reference where the quantity is being typed in:

Value(TextInput.Text)>LookUp(*excel_table*,item=*item_name*,Quantity)  

 

If the statement is true the label will be visible else it will be invisible. Not entriely sure how you have the template setup. If you have it in a collection it may be faster.

 

Let me know if this helped, provide some more information or screenshot of the varibles.

Highlighted
Helper II
Helper II

Re: Inventory notification

Thanks for that explanation - I'm getting an "expecting a number value" error. Here's what (I think) I know:

 

1) The form is setting a global variable of Set(ItemSelected, ThisItem). It's getting passed from a browse screen to a reserve screen, where I'd like the warning to display.

 

2) I've renamed the quantity field to "productquantityfield". So my visible formula for the error is: 

Value(productquantityfield.Text)>LookUp(Checkedout,ThisItem=productquantityfield,"Quantity")

 

Where Checkedout is my table name, and "Quantity" is the name of my table column. 

Highlighted
Continued Contributor
Continued Contributor

Re: Inventory notification


@loganl wrote:

Value(productquantityfield.Text)>LookUp(Checkedout,ThisItem=productquantityfield,"Quantity")

Is it as simple as your comma mistake above?  Shouldn't it actually be:

Value(productquantityfield.Text)>LookUp(Checkedout,ThisItem=productquantityfield."Quantity")

Highlighted
Helper II
Helper II

Re: Inventory notification

Appreciate the quick help, @jhall - no dice. Now I'm getting

 

"Unexpected characters. The formula contains 'Ident' where 'Quantity' is expected.

"Expected operator. We expect an operator such as +, *, or & at this point in formula."

 

Highlighted
Continued Contributor
Continued Contributor

Re: Inventory notification

After looking closer at your function, I'm not sure what you're really trying to do here.  

Value(productquantityfield.Text)>LookUp(Checkedout,ThisItem=productquantityfield."Quantity")

The bolded section has me scratching my head.  

This is just to see if we're trying to order more than what is available of a particular product, correct?  Is that what the LookUp() is supposed to be doing (getting the current amount available)?

 

Highlighted
Helper II
Helper II

Re: Inventory notification

Correct, @jhall - I'm trying to prevent a user from checking an item if the quantity they request is more than what is in stock. Beg your pardon for the ignorance on the structure of the formula; this was what was suggested to me earlier. 

Highlighted
Continued Contributor
Continued Contributor

Re: Inventory notification

Well, to start w/ the basics, I'm assuming you got your Excel form by importing it into the application.  Via View | Data Sources | Add data source | import Excel.  So if you do the above series of clicks then you see something similar to:

image.png

From there, if you can do a quick test of linking this to a Data Table in PowerApps then that will help us in verifying field names and I can be specific.  Add a new Data Table via Insert | Data table.  Change the Items property to be the name of your Excel item from above (e.g. Table1).  Click the Fields property and select any/all fields associated with what we're doing here.  

You should now see a Data Table that shows rows/columns that contains data from your Excel document.  If you give me a screen shot of that (mainly column headers is what I care about) then I can be specific.

Highlighted
Continued Contributor
Continued Contributor

Re: Inventory notification

Also, keep in mind that this data is NOT live (I seem to be typing this a lot today).  Excel imports with PowerApps are only done when you (the developer) refreshes this info.  So it is not "real time" for users.

The primary way to make Excel Tables and PowerApps display data that is in real-time is via linking both to a SharePoint List (or something similar).  PowerApps cannot link directly to Excel for real-time data.

Highlighted
Helper II
Helper II

Re: Inventory notification

Thank you @jhall - here's a snip of my "Checkout" table excel table fields. 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,600)