In the attached code, I am creating a simple report.

In the attached code, I am creating a simple report. I am using the a!gridField() function. The first column is referencing an id called "university_id". Instead of the ID, I would like to display the actual text. For that I created a query rule that given a university_id it returns the corresponding University object. Right now, in the first column of the grid, I am doing index(local!datasubset.data, "university_id", null). If I call the query rule as shown here: University_getUniversity(index(local!datasubset.data, "university_id", null)).univ_name, it will only display the name for the first row of the grid. Why is this happening?

OriginalPostID-183348

 

code.txt

  Discussion posts and replies are publicly visible

Parents
  • @erickp Could you please see what logs is saying about the error message? As a part of debugging, I would like to suggest to check if rule!University_getUniversity() is giving you the desired values. And also make sure that it handles null values while getting the data. Next to it, check if index(local!datasubset.data,"university_id",null) is yielding a proper output so that the fn!displayvalue() is getting the input as expected. The reason why I have been saying this is, query entity won't return a datasubset and accessing the values by using .data and the name of the column won't give the values as expected.
Reply
  • @erickp Could you please see what logs is saying about the error message? As a part of debugging, I would like to suggest to check if rule!University_getUniversity() is giving you the desired values. And also make sure that it handles null values while getting the data. Next to it, check if index(local!datasubset.data,"university_id",null) is yielding a proper output so that the fn!displayvalue() is getting the input as expected. The reason why I have been saying this is, query entity won't return a datasubset and accessing the values by using .data and the name of the column won't give the values as expected.
Children
No Data