So I have an equipment log/asset list app made to help our mechanic so he can sort the list of machines and add notes and maintenance info. Im trying to add a toggle switch to hide that particluar asset in the list.
Right now my screens go
Full List -> Click to go to individual asset -> click pencil to edit -> then in edit I want to add a toggle to hide that individual asset from the full list.
Any suggestions on formulas? Im currently pulling my data from a common data service list.
If I understand correctly you could add a Column for example "Status" and have that be an Active/Inactive (or any other values that makes sense for the scenario), and the Filter by that column to only show the ones you care.
For example, if we use the "Account" standard entity in CDS, there is a column Status with Active/Inactive values. In the default "App from Data" generated expression in the Full List you have an expression like:
If you add a Filter expression like:
Filter(Account, Status = "Active")
Then you get the desired behavior, and when you change a row to be Inactive it will not be shown in the full List. (The one caveat is you would not be able to mark it Active again, so you might want to add a checkbox "Show Inactive" where there you could change your expression like:
Filter(Account, Status = "Active" || showInactiveCheckBox.Value )
That way when you check/uncheck the Inactive accounts will be shown or not.
So I tried adding the fileter expression into Data: Items but it wont accept it.
Currently my formula in items is:
SortByColumns(Search(Equipment, TextSearchBox1.Text, "CreatedByUser","LastModifiedByUser","Make"), "Category", If(SortDescending1, Descending, Ascending), Filter(equipment,owned="yes"))
I added a column called "owned" with yes and no filled into each cell. I have a toggle switch in my "edit" page that defaults to whatever the owned column is set to. That works fine, so when owned=yes then the toggle=true. Not sure why that one works but my data items wont.
Also with my toggle set like that, I want to be able to set it to "false" and switch the value + my filter to change that asset to owned=false. Am I on the right track? What am I missing?
Check it out!
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand