I am trying to pass in the Label Annotations from a Google Vision connected system into an editable grid. When I use the attached code, fv!item.description and fv!item.score returns the data as a single list of string as opposed to the 10 independent dictionary items. How can I correct this?
rows: { a!forEach( items: local!gvLabels, expression: a!gridRowLayout( contents: { a!textField( value: fv!item.description ), a!textField( value: fv!item.score ) } ) ) },
Discussion posts and replies are publicly visible
Are you able to provide a sample of what the structure of local!gvLabels looks like?
[mid:/m/02q2kc3,description:Vehicle door,score:0.8949996,topicality:0.8949996]; [mid:/m/07yv9,description:Vehicle,score:0.7891846,topicality:0.7891846]; [mid:/m/01lrnl,description:Windshield,score:0.7330366,topicality:0.7330366]; [mid:/m/0h8ls87,description:Automotive exterior,score:0.7311965,topicality:0.7311965]; [mid:/m/02mnkq,description:Bumper,score:0.7284476,topicality:0.7284476]; [mid:/m/039jq,description:Glass,score:0.7177184,topicality:0.7177184]; [mid:/m/0k4j,description:Car,score:0.6750773,topicality:0.6750773]; [mid:/m/0h8lhq_,description:Automotive window part,score:0.6319218,topicality:0.6319218]; [mid:/m/02df64,description:Hood,score:0.5599056,topicality:0.5599056]; [mid:/m/02417f,description:Windscreen wiper,score:0.5486392,topicality:0.5486392]
Output in a paragraph field.
what happens when you do fn!typename(fn!typeof(local!gvLabels)) ?
if that comes back as "Text", that could part of your problem - did you make a CDT to load these into?
That's most likely the issue. It's returning a list of variant.