Hi All,
I wonder if anyone can help. I am losing the will to live with this one. So I have a "|" delimited string from an API that I am Splitting into a Collection and using a sequence to ensure all the values go into the right columns. This works fine and I can do a "CountRows" function and I can obtain the info I want..
With({items:Split(RecLMIGeneralChannelOutput.opgeneralchanneldata,"|")},
ClearCollect(colActiveSessions2,ForAll(Sequence(CountRows(items),1,19),
{
SessionID: Index(items,Value + 1).Value,
SessionStatus: Index(items,Value + 2).Value,
ChannelID: Index(items, Value + 3).Value,
Channel: Index(items,Value + 4).Value,
TechnicianID: Index(items,Value + 5).Value,
Technician: Index(items,Value + 6).Value,
StartTime: Index(items,Value + 7).Value,
WaitingTime: Index(items,Value + 8).Value,
CustomField0: Index(items,Value + 9).Value,
CustomField1: Index(items,Value + 10).Value,
CustomField2: Index(items,Value + 11).Value,
CustomField3: Index(items,Value + 12).Value,
CustomField4: Index(items,Value + 13).Value,
CustomField5: Index(items,Value + 14).Value,
Language: Index(items,Value + 15).Value,
TransferredTo: Index(items,Value + 16).Value,
TransferredComment: Index(items,Value + 17).Value,
IsLeadTechnician: Index(items,Value + 18).Value,
HandingOff: Index(items,Value + 19).Value
}
)
));
If(!IsError(CountRows(colActiveSessions2)/19), Int(CountRows(colActiveSessions2)/19), 0)
The above works fine, but then if I try to filter the results I get an error to obtain another value I get an Index error...
So this is the line..
If(!IsError(CountRows(Filter(colActiveSessions2,SessionStatus = "Waiting"))/19), Int(CountRows(Filter(colActiveSessions2, SessionStatus = "Waiting"))/19), 0)
And this is the error..
Hope someone can help!!!