I'm looking to display two columns ("Month", "FAQ Item Name") from a SharePoint list that contains information about when certain reports are updated for an information app i'm creating.
I need to see a distinct list of "FAQ Item Name" (Which has multiple iterations of items each with different dates) where it shows the item with the soonest occurring month. This is so I can create a table that shows, for example, the next three reports that will be updated. I pull this into a "calPre" collection.
There is a slight problem in that "FAQ Item Name" is a lookup column, so it comes into a collection as a record that a table can't parse the text from, as well as having a number of blank records in that column that i need to filter out.
My solution to this is to pull that first collection (calPre) into a second collection (calPre2) that removes my blank rows and just gives me the two columns i'm interested it:
So now I have my two columns. You can see an instance above of the information that I might want to sort out: I would need to have a distinct list of the FAQItem column where the items that are returned are the ones with the soonest occurring date. My thinking is that I would create a new collection every time the app opens that would recalculate this, and I could sort it by the dateMonth column, then show the TopN number of results to get my 3 reports that will be updated soon.
I've tried GroupBy, AddColumns, filtering by date, all the variations of Text() or Distinct().value/result and I either don't get anything returned, the dates are wrong, or it brings back lines and lines of [Object object] errors.
I'm having real difficulty with something that I thought would be quite simple. Any help would be greatly appreciated!
I just found that the syntax you provided was ever so slightly off for what I needed (That's not in any blame by the way; you provided a fantastic solution for a problem that I didn't fully explain!). However, the explanations on the reading of the syntax and the functions were informative enough that I was able to go in and change my code really quite easily to pop out a perfect solution. 😄
If you're ever in Manchester, UK, I'm buying you a beer!