How to create a warning view with acknowledge button?

Hello!
I'm making some changes to the Inventory Management app and I’m facing this problem, therefore I need some tips to do this.

I'm trying to do a warning view with a slice of the Items table. This table has a virtual column [Total Stock Available] and I added a column [ESTOQUE MIN] (Minimum Stock in English) as a reference to the next purchase order. When the Total Stock Available sum reaches or crosses the [Minimum Stock] value I want to change another virtual column from false to true. I can't use this IF([Total Stock Available] <= [ESTOQUE MIN], true, false) because I want to have a button to acknowledge this “warning” after to send a new purchase order. This value will turn false, but IF([Total Stock Available] <= [ESTOQUE MIN], true, false) would be true.
I tried the this AND([_THISROW_AFTER].[Total Stock Available] <= [ESTOQUE MIN], [_THISROW_BEFORE].[Total Stock Available] > [ESTOQUE MIN]) in a virtual column [Status] but didn’t work. I tried some bots and behavior nothing works.
Any clue to help me?

 

Thanks in advence!

0 9 216
9 REPLIES 9

Hello @ErickSE , let's see if I got this right, you have:

1- A list of items
2- A minimum number of stock for each on your [ESTOQUE MIN] column
3- A VC  [Total Stock Available] that calculates the current stock

And you want to show the user a warning when [Total Stock Available]<=[ESTOQUE MIN] and to allow him to acknowledge this warning.

The problem here is that you need some way of storing those warnings in order to have a way for the app to know if the user has acknowledged the warnings before or not, and so this cannot be done with virtual columns alone.

You could have a new table just for the warnings, that will be populated each time one of your items goes below the stock threshold, you could accomplish this with bots or actions, then you would have a warning view with these, and have buttons for the user to acknowledge the warning and/or send a new purchase order, what do you think?

Hello @Rafael_ANEIC-PY, thank you for replying me.

You're right. I already tried to create a new table to receive data from Items when the [Total Stock Available] of each row reaches the [ESTOQUE MIN]. But couldn't config a bot to do this. For me this would be the best solution.

Do you have any idea how to set this bot?

Thinking more about it, I wouldn't use a bot, but an action that will run on form completion on your form for inventory movements with a condition that will only run when the [Total Stock Available] of an item reaches the [ESTOQUE MIN], then, if that happens, it should add a new row to another table, which will be the table "Warnings", there it should save the datetime and the id of the product that is running low.

I'm going to try this.

Can I use this formula AND([_THISROW_AFTER].[Total Stock Available] <= [ESTOQUE MIN], [_THISROW_BEFORE].[Total Stock Available] > [ESTOQUE MIN]) as a condition to run the action?

I have a Inventory_Form that populate a table Inventory and a VC in Items table sum the total of movements. I'm thinking about to put a action after form saved, but this action need to be made to Inventory table, to add a new row to table Warnings. Can I config condition with that formula above? because it need to be linked to another table.

You can try using just this expression, considering [Total Stock Available] displays current stock AFTER substracting the movement that is saved on the new row:

[Total Stock Available] > [ESTOQUE MIN]

If it's not included, which means that the total stock is shown before the user types in the amount to move, and it is not changed afterwards, then the expression would be like this:

([Total Stock Available]-[Quantity]) > [ESTOQUE MIN]

@Rafael_ANEIC-PY, with your idea I got some solution.

I made some changes in the Log Inventory Change action button, now I have two buttons.

action button 1 - a. I set the condition [Total Stock Available]>=[ESTOQUE MIN], this button has a LinkToForm to a Inventory_Form.

b. In the form view I set a action after form saved. This action add a row to the Warning table, with the condition [Item ID].[Total Stock Available] < [Item ID].[ESTOQUE MIN].

action button 2 - I set the condition [Total Stock Available]<[ESTOQUE MIN], then this action button only opens the Inventory_Form.

So, with these two buttons I only add a row in the warning table when [Total Stock Available] change value from >= to < [ESTOQUE MIN].

Where do you want to provide the Acknowledgement button?

I would approach this in two steps:

1)  Once the Available Stock reaches some low-level threshold, use a Format Rule to highlight that item.  Maybe color the item name Red and display a warning symbol in front of the name.  This will show anywhere that item is displayed.

2)  If the display in 1) is not enough of a warning, then in the Form(s) that affect the [Total Stock Available], use validation (and a related custom message) to show a warning message before Saving and requires Acknowledgment before being allowed to Save.  You would do this by:

     a)  Adding an Acknowledgement Y/N column that is shown and required when threshold is crossed - i.e. same expression in Show_If and Required_If.  The Initial Value is FALSE  and the column is "Reset on Edit".

     b)  Insert validation on your Quantity column to perform the "threshold" check (should be the same expression used to show and require Acknowledgement) AND also checks that Acknowledgement is TRUE. 

 

I hope this helps!

 

Hello @WillowMobileSys , thank you for replying me.

Your first solution I have implemented. I use a format rule to highlight the Item Name:

ErickSE_0-1649346824344.png

 

It works, but isn't enough.

I will consider to test the second option to see the affect in the process. 

 

The steps @WillowMobileSys mentioned are pretty solid ways of warning your users, I don't think it would be worth it to make the mini system required to make the warnings work when you could do it that way instead.

Top Labels in this Space