Hi, I have a question how can I get the value from a dictionary?
e.g. Status: "enable", how can i get only the text?
in this image how can i get the text "enviado"?
And the value of a list of dictionaries with a specificied key?
Discussion posts and replies are publicly visible
You can use the fn!index() and use the 'name' of the name/value pair (rather than the index number) as if you were asking it to search the dictionary e.g. fn!index(<myData>,"estadopedido", null). Note that the third parameter is what will be returned if the search does not find what you've asked for. Here's an example:
a!localVariables( local!myDictionary: { item: 1, description: "Widget", color: "Green" }, fn!index(local!myDictionary,"color",null) )
returns:
Thanks, it works!
a!localVariables( local!myDictionary: (index(a!queryEntity( entity: cons!GP_Pedido_Entity, query: a!query( selection: a!querySelection( columns: { a!queryColumn( field: "estadopedido" ) } ), logicalexpression: a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter( field: "nombrepedido", operator: "=", value: ri!nombrePedido ) }, ignoreFiltersWithEmptyValues: true ), pagingInfo: a!pagingInfo( startIndex: 1, batchSize: -1 ) ), fetchTotalCount: false ).data,1)) , fn!index(local!myDictionary,"estadopedido",null) )