hi
so in my app I have a collection which pulls together all the room bookings from all the room lists (SP lists) for this user
now using a checkbox in the gallery , I want to delete all items from the original SP list when the tick box is selected and where certain details match certain details in the list item.
this is the formula which i came up with but it seems to delete all items in that room list even if you only select 1
ForAll('gal-my bookings'.AllItems,If('cb-m-bookings-select'.Value=true,
If(ThisRecord.Room="Main School ICT Room",RemoveIf('MS-ICT','booked from'=ThisRecord.'booked from',Lesson=ThisRecord.Lesson, name=ThisRecord.name),
If(ThisRecord.Room="Trolley A",RemoveIf(TrolleyA,'booked from'=ThisRecord.'booked from',Lesson=ThisRecord.Lesson,name=ThisRecord.name)))));
Solved! Go to Solution.
Actually...as monstrous as the JSON dump was from the trace you provided, I decided to digest through that as best I could to discover any issues, because I figured with screenshots, that we would get to a back and forth with a "click there and send another screenshot" series of messages.
So, I see that you have a good chunk of formula below the formula we are working on that collects into a bookedsessions2 collection. That one needs some work!
But, sticking with the current formula, I do see that an attempt to delete from each of the lists is being done in one execution. It is indicating a delegation issue. So, before I go down the wrong path...what is the current number of records in your lists - or, are they over 2000 currently?
hi
the collect formulas is collecting all the items from multiple SP lists which we have just deleted from to update the contents of the gallery as the gallery shows everything in the "bookedsessions2" collection, as far as i was aware it was working ,but I may be wrong.
as for the delegation , I don't anticipate each list going over the 2000 record limit
Okay...then I need to scrub through the dump you sent a little more to see if I can discover a root cause.
If you don't hear back from me within the next day or so...nag me!
Can you send me a screenshot of the current formula you have? Especially showing any delegation warnings it may have. I am trying to match the trace dump with the formula and want to see if there is anything I can connect from the trace.
Thanks!
hi
just want to update you on things
so I have majorly simplified how the app works now by combining everything in to one list and therefore making sure my formulas delegate ( which was the reason for the separate lists previously to stay under 2000 records ) .
so now the formula I have used for this part which is now one single list is as follows
ForAll( RenameColumns(Filter('gal-my bookings'.AllItems, 'cb-m-bookings-select'.Value = true), "ID", "ID1"),
Remove(Bookings_DB,
LookUp(Bookings_DB,
ID = ID1)) )
Simple is better!!
However, to simplify further, your formula should be this:
ForAll(
Filter('gal-my bookings'.AllItems, 'cb-m-bookings-select'.Value = true) As gb,
RemoveIf(Bookings_DB, ID=gb.ID)
)
Your posted formula would be making two data operations - Remove and LookUp. The above uses one operation.
User | Count |
---|---|
194 | |
123 | |
87 | |
48 | |
40 |
User | Count |
---|---|
274 | |
165 | |
138 | |
80 | |
76 |