Am I using AsEnumerable correctly

Hi there guys, Im playing around with some methods and the one in particular I’m stuck on is AsEnumerable and i want to know if I’m using it correctly. So I created an array of grades and I’ve initialized it like so: myGradesArr = {80,100,75} then I used an Assign activity like so:
enumMyGrades = myGrades.AsEnumerable().where(function(grade) grade < 100) Then i used a ForEach to loop through enumMyGradesand i get two of the following: “System.Linq.Enumerable+WhereArrayIterator`1[System.Int32]”. Thanks in advance for your help

1 Like

@Russygrl Can you tell us what do you want to do Actually? :sweat_smile:

i just want to see what it does!

@Russygrl What is the Data Type of enumMyGrades ?

something like thisenum2


@Russygrl Also in the For each shouldn’t you be printing the Value item instead of enumMyGrades ?

Hello @Russygrl

You are looping enumMyGrades
In your log message you need to use item variable of the for each loop as its contains each item of enumMyGrades

Put item in log message and check if its working or not

Oh my gosh @supermanPunch i just pulled a homer simpson,i cant believe i made that mistake!!! Thanks!!! :heart_eyes:


@Russygrl I hope your Problem is Solved :sweat_smile:


It works!! I love, this can really shorten code! thanks again


hi there @vickydas, yes!! That’s a mistake made at 12 am!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.