Hi, please help I want to delete a row using the difference between quantity and available item and if it's equals to zero I need to remove the item. I use this code but it still remain in the list.
Remove(Prod, If(qty-available=0, Gallery1.Selected));
I also use Remove(Prod,Gallery1.Selected);
however even if the row is not equals to zero the data will be deleted.
Solved! Go to Solution.
RemoveIf(Product,qty-available=0)
ref:https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-remove-removeif
Hello, @jayceeb, Try using RemoveIf function instead.
RemoveIf(Prod, qty-available=0);
If my reply helped you, please give a 👍 , & if it solved your issue, please 👍 & Accept it as the Solution to help other community members find it more. I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends. Visit my Blog: www.powerplatformplace.com
|
RemoveIf(Product,qty-available=0)
ref:https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-remove-removeif
I just try it but still the row not deleted
Are you sure that the column you indicated (qty-available) is the one containing the 0. It is shown as Total Qty in your table.
@jayceeb, what you shared has the column Total Quantity. Use RemoveIf(Prod, qty-availableTotalQuantityColumnName=0);
I use the labels, instead of total qty column name however it still the same. 😞
patch update is no issue however when it comes in deleting the item with 0 values still remains
RemoveIf(ProdCount, Counte_1-'Total Qty'=0);
I am now confused about what the name of your data source is. (ProdCount, Prod, Products)? Whatever, do a collection of it
Collect(colprod,yourdatasource) and use the view>collections to see what the actual name of the column containing the 0 is.
the datasource name is ProdCount and it's link in the excel file.
this is my complete code. only the the remove code is not working.
Patch(ProdCount,
Coalesce(LookUp(ProdCount,Date = df_2.Text&&'Product Name'=Itemselect_1.Selected.Result&& Menu=LookUp(ProdCount,'Product Name'=Itemselect_1.Selected.Result,Menu)&&Packaging=LookUp(ProdCount,'Product Name'=Itemselect_1.Selected.Result,Packaging)&&'Menu Code'=LookUp(ProdCount,'Product Name'=Itemselect_1.Selected.Result,'Menu Code')),
Defaults(ProdCount)),
Prodform_1.Updates);
ResetForm(Prodform_1);
RemoveIf(ProdCount,Counte_1-'Total Qty'= 0);
hi good morning. the name of my datasource is ProudCount and it's link in my excel in onedrive.
I'm using forms to update the new data. and if the value is equals to 0 i want it to remove automatically in my excel. It's like inventory that if you remove and add value.
Patch(ProdCount,
Coalesce(LookUp(ProdCount,Date = df_2.Text&&'Product Name'=Itemselect_1.Selected.Result&& Menu=LookUp(ProdCount,'Product Name'=Itemselect_1.Selected.Result,Menu)&&Packaging=LookUp(ProdCount,'Product Name'=Itemselect_1.Selected.Result,Packaging)&&'Menu Code'=LookUp(ProdCount,'Product Name'=Itemselect_1.Selected.Result,'Menu Code')),
Defaults(ProdCount)),
Prodform_1.Updates);
ResetForm(Prodform_1);
RemoveIf(ProdCount, Counte_1-'Total Qty'=0);
User | Count |
---|---|
125 | |
87 | |
86 | |
75 | |
69 |
User | Count |
---|---|
217 | |
181 | |
140 | |
97 | |
83 |