Hi,
I am wondering if anyone has a solution for this issue that I am facing.
I have a SharePoint list with multi rows with the same value in A, B, C column and different time value in a time range.
I want to combine multiple rows into a row, looks like below:
Does anyone here know if there is a way to do this?
Thanks
We are going in circles - that is not the code I posted that you are saying has errors.
I meant the entire Items code of your gallery -> please find my Items code of Gallery below.
Thank you very much for your kindly help.
SortByColumns(
Filter(
'Desk Reservations',
'Reserved By'.Email = currentUser.Email && 'Check Out From Number' >= Value(
Text(
Now(),
"yyyymmddhhmm"
)
)
),
"CheckOutFromNumber",
Ascending
)
I meant the entire Items code of your gallery - I cannot tell much from two lines at the top and that simply there are errors in them. Due to time zone, I am going to offline now. Can you please read back through this post and in particular the code I supplied - it is going to be fairly close to correct - just make sure your references are valid.
can you please supply the code in text and in the picture show the entire code -> sure, please find below code for your reference.
Upper(Text(DateTimeValue(ThisItem.'Check Out From Text'),"[$-en-US]mmm"))
Upper(Text(DateTimeValue(ThisItem.'Check Out To Text'),"[$-en-US]mmm"))
Upper(Text(DateTimeValue(ThisItem.'Check Out From Text'),"[$-en-US]dd"))
Upper(Text(DateTimeValue(ThisItem.'Check Out To Text'),"[$-en-US]dd"))
Text(DateTimeValue(ThisItem.'Check Out From Text'), DateTimeFormat.ShortTime) & " to " & Text(DateTimeValue(ThisItem.'Check Out To Text'), DateTimeFormat.ShortTime)
ThisItem.'Desk Text'
The bit you posted does not help me - can you please supply the code in text and in the picture show the entire code. Also please note this needs some investigation on your end into the validity of the values referred to - I cannot see your data and can only rely on what you post. My code is more guidance on the structure required - it is up to you to apply your values to it.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Sorry, I didn't explain that very well. Thank you for your patience.
Below is the error
The function "GroupBy" has some invalid arguments.
The function 'AddColumns' has some invalid arguments.
I am getting a bit lost here - your post question was how to group records that match on four fields - the GroupBy() function will do that (can we please stick on this subject). What code are you using with the GroupBy() - in Text please and why is it not working (do you get an error - if so what - or do you get the wrong results?)
Noted with thanks. I tried your group by code in gallery but it's still not working. I guess because I have many titles in gallery. Should I set a flow to edit value in SharePoint list? Please advise.
I meant the code I posted as the Items of the gallery
GroupBy(
YourListName,
"Name",
"StartDate",
"EndDate",
"StartTime",
"EndTime",
"Data"
)
you probably need something like this
SortByColumns(
AddColumns(
GroupBy(
Filter(
'Desk Reservations',
'Reserved By'.Email = currentUser.Email &&
'Check Out From Number' >= Value(Text(Now(),"yyyymmddhhmm"))
),
"Name",
"StartDate",
"EndDate",
"StartTime",
"EndTime",
"Data"
),
"SortNo",
First(Data).'Check Out From Number'
),
"SortNo",
Ascending
)
but again I must ask (as per your previous post) why are you converting dates to numbers (this was necessary some time ago before dates were Delegable, so maybe you have an old template)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
WarrenBelz
146,658
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional