1. When I create a collection in SharePoint list based on a filter, I get a result but also get all columns from the list. I only want one column. I cannot seem to get just that. Any Ideas?
2. When I get the result I then want to reduce it further by filtering out recordes that match another list (collection). . The aim is to create a drop down for the user that only see the results, negating them from picking something they should no lonegr be able to. Any Ideas?
To gove you full picture, this is a vehicle bookings APP where the full fleet by site in one Lists and Bookings are stored in another. I want new bookings to only be allowed to select a vehicle that is not booked yet
Solved! Go to Solution.
OK I solved my issue. I needed to create two collections. One based on the completed list of Veh and one base on those veh booked based on a filtered date. Using Forall I then removed all matching records from the Main Veh collection. This then gave me the result of only a list of vehicles available in the period. This also soved my probles of how to create a collection based on one column in a share point list. The Forall became the key in the whole process. Things I also noted was ClearCollect cannot be used in a Forall. You alos cannot use removeIF if the Forall is based on the same datasource
This was the syntax below:
ForAll('CAT 2 Defence Vehicle List',If(IsBlank(Title)=false,
Do you have a field in your SharePoint list that contains whether the vehicule is booked or not (Yes/No field)?
Then you can easily solve your issue to filter on booked vehicules.
If you could also provide so screenshots of your app that you already have so we can understand a bit more what you want to achieve would be great.
The bookings List does, but it is not practical to do that in the main vehicles list as booking date to and froms are variable. A vehicle could be free one day and not the next. So In order to get the non booked on a particular dates I need to to address this aspect.
Thanks for your prompt reply.
I simply a forall would work in mosts case in DB I have worked with, but in this case I cannot seem to get any syntax that that would match two collections where Collection one in all Veh whice is reduces by the booked vehicles in collection two.
Does that make sense?
My logic so far is to create a collection that is based on the Master vehicles but fileterd to the site they are at. The second collection takes the date of the booking request and shows vehicles booked on that day. Now I am trying to reduction Collection one by removing those vehicles from its collection. This result would then be used to create a dropdown where the user selects for their new bookings.
I am stumbling as well over the Collection of the master Vehicles. I only want it to show the one column from the sharepoint list but I get all of them.
Her are a couple of screenshots. Screen 1 is the master caledar that reflect all bookings to date. Screen two shows the add new booking. At the moment teh drop down will allow a user to selecte unbooked veh. This is what I am trying to prevent
I get the most of it where you want to go with this. I think you can use a Filter or a Search function to look for the column when you collect your data into your collection so you only collect that one column. I didn't work alot with collection myself but I guess that can be done.
So if I understand it correctly you need to sort on the to and from date when this is filled in?
You mean that you want to prevent that a user can select a booked vehicule right?
You mean that you want to prevent that a user can select a booked vehicule right? Yes
I can accept all columns in acollection OK, but as I undertand the remove function in a collection needs to match all teh Columns exactly. This is massive and not really achievable based. I thought if I narrowed to two list to the simple veh rego, it would be the solution. Not there yet.
Can't you use Filter or Search instead of Remove?
The Filter or Search will just "hide" the results that dont need to be shown.
Also it is already a nice app. Nicely done!
Yes but how do you dynamically hide rows based on a result or a filter in another list. I cannot find syntax that does domething like (in its simplest form)
Pending the solution I am after for this, I did create a simple work around. When the user selcts a veh rego from the drop down, it checks if it is booked and if so tells the user so.
It would still have been good to have a solution where only non booked veh are in the list
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