getUniqueValue is returning null

tzsabre
Tera Contributor

I have a script include that is supposed to filter the results for the Project Glide Category based on the Category selected. I can see that the query is grabbing the correct number of rows with .getRowCount();, but .getValue("sys_id"));
and .getUniqueValue(); both return null. When I try to loop through the query with a while loop it is also running and infinite loop.

tzsabre_0-1687801906757.png

tzsabre_1-1687801917381.png

 

1 REPLY 1

Tony Chatfield1
Kilo Patron

Hi, unfortunately the details in your post and screenshot of your function script do not make your intentions clear (plain text attachment or code snippet is always the best way to share script).

Your codes syntax is incorrect as it does not call the next() method correctly.

while(choice.next()){

I suspect getValue('sys'); returns null as the sys_id field is the records unique identifier and is not like other fields,

but I cannot find a vendor explanation.

However once you update your next() syntax , choice.getUniqueValue() should return a valid result.