IVAN88 Posted April 26 Report Share Posted April 26 Hi, I have a table that record In-Out inventory transaction by batch number. My case : On Out transaction I want, user can only select product that still have a remaining quantity, I want to hide a zero quantity product. the remaining quantity will be group by batch number How can I do that ? Rgds, Quote Link to comment Share on other sites More sharing options...
0 Barry Posted April 26 Report Share Posted April 26 Hello Ivan, In the "Configure Filtering Fields" of the Report you can use comparisons with values. You could add the quantity there with the "Greater Than" type. Something like this: Quote Link to comment Share on other sites More sharing options...
0 ParkLoey Posted April 28 Report Share Posted April 28 Hi! Just wanted to share a reference where we can check what comparison types in report pages Caspio supports: https://howto.caspio.com/datapages/reports/search-and-filter-comparison-types/#:~:text=gmail.com”)-,Comparison Types,-The following is Quote Link to comment Share on other sites More sharing options...
0 IVAN88 Posted May 10 Author Report Share Posted May 10 Hi Barry and ParkLoey, What I meant, When user input Out Transaction, insert product Name and Quantity, If they input quantity larger than available quantity, they can't submit the record. Rgds, Quote Link to comment Share on other sites More sharing options...
0 cheonsa Posted June 21 Report Share Posted June 21 Hi @IVAN88, You can hide the button to prevent the users from submitting the record if the value they enter is greater than the available quantity. First, you need a formula to compare the available quantity and the requested quantity. You can use a Virtual Field > Calculated Value. For example: CASE WHEN [@field:Quantity] > (SELECT (Product_Quantity) FROM TABLE WHERE Product_Name = target.[@Product_Name]) THEN 'Available' ELSE 'Not Available' END Then, add this script in the Footer of the DataPage: <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { document.querySelector("input[name='cbParamVirtual1']").addEventListener('change', function() { if (document.querySelector("input[name='cbParamVirtual1']").value == 'Not Available') { document.getElementsByClassName('cbSubmitButtonContainer ')[0].style.display = 'none'; } else { document.getElementsByClassName('cbSubmitButtonContainer ')[0].style.display = 'inline'; } }); }); </script> NOTE: The cbParamVirtual1 refers to the Virtual Field 1. Hope this helps. Quote Link to comment Share on other sites More sharing options...
Question
IVAN88
Hi,
I have a table that record In-Out inventory transaction by batch number.
My case :
On Out transaction I want, user can only select product that still have a remaining quantity, I want to hide a zero quantity product.
the remaining quantity will be group by batch number
How can I do that ?
Rgds,
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.