Hey I have the query-
index="classroom-students" profile.emailAddress="something" earliest=0 latest=now
| join type=outer courseId
[search index="courses" courseState="ACTIVE" ]
| join type=outer courseId max=0
[search index="course-work" | rename id as courseWorkId ]
| join type=outer userId, courseId, courseWorkId
[search index="students-submission" | dedup userId, courseId, courseWorkId sortby -updateTime]
| rename profile.name.fullName as StudentName
| rename name as Classroom
| rename submissionHistory{}.gradeHistory.pointsEarned
as pointsEarned
| table StudentName, courseId, courseWorkId, userId, Classroom, descriptionHeading, title, workType, maxPoints, pointsEarned, state, late.
In late column,i get "true" in some rows.I want to color those rows where I am getting "true" in late column.Like if u look at the imagfe,I want to color the whole second row.
Any help would be highlt appreciated.Thanks in advance.
It has just occurred to me where the additional true is coming from. The fields which come alphabetically after late are the ones with the extra true. This means that the mvappend is taking the updated value of late i.e. two copies of true, for these subsequent fields. Try changing to this
| foreach * [| eval <<FIELD>>=mvappend('<<FIELD>>',mvindex(late,0))]
or
| foreach * [| eval <<FIELD>>=if("<<FIELD>>"=="late",late,mvappend('<<FIELD>>',late))]
This solves my problem to a few extent as it removes true from the already filled column but doesnt remove it from the empty one.Please have a look at the image.
Thanks for ur reply @ITWhisperer
You could try putting the copy of late as the first entry in the mv fields then hiding index 0
| foreach * [| eval <<FIELD>>=if("<<FIELD>>"=="late",late,mvappend(late,'<<FIELD>>'))]
| eval late=mvappend(late,late)
<style>
#tableRowColor table tbody td div.multivalue-subcell[data-mv-index="0"]{
display: none !important;
}
</style>
Still facing this issue @ITWhisperer
Can you share a screen capture of an inspection of the problematic fields?
OK so the issue is that the fields only have one entry in so are not displayed as multivalue-subcells. To fix this, you could either add true twice and hide two rows, or use fillnull value="" before the foreach so at least there is an empty string (with this you can go back to adding the true after each field or leave it as adding it before)