Skip to main content
October 16, 2023
Question

display field from query

  • October 16, 2023
  • 2 replies
  • 0 views

In my "Request " CDT  , i have a field named "branch" of type number. 

I am trying to display the branch ID  on the interface , from the query "GetRequestData". 

value: rule!GetRequestData(ri!documentID).branch,

ri!documentID holds the ID of the request. 

when I test the query it returns the data correctly, but on the interface it doesn't show.

when i debug the process model it shows ((Cannot index property 'branch' of type String into type List of Variant)) 

i don't quite understand the error message.

how can i display it correctly ?  

 

2 replies

stefanhelzle0001
Brainy
October 16, 2023

I do not understand what you are trying to do. You write about displaying something, and in the next sentence you talk about a process model.

Do you mind helping us to understand what is going on, and share more details?

October 16, 2023

a!localVariables(
  local!var21: {{}},
  local!var21.data
)

Looks like your case is something like this,,trying to retrieve the data from an empty dictionary.
try doing a null check for a key before using the cdt.