Cannot access to array properties from a query to database in workflows #728

Closed
opened 2026-04-05 16:22:27 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @luisxkimo on 8/26/2024

Describe the bug
Cannot access to array properties from a query to database in workflows components.

To Reproduce
Steps to reproduce the behavior:

  1. Create new workflow and add "database query find one" component
  2. Add Custom Javascript component, and try to access to one column of previous componente that returns an array

Expected behavior
If you access to the "returned value" from the query that is an array, save this in a variable like an array or at least save like an "string"

Screenshots
You can see here that from returned value "labels" as an array, the access to this in next component returns [object Object]

image

Here is the custom javascript code:

stringlabels={{local.components.monitor-find-one-1.returnValues.model.labels}}
// if you use '{{local.components.monitor-find-one-1.returnValues.model.labels}}', then the string '[object Object]' is saved
return stringlabels

Desktop (please complete the following information):

  • Browser: Edge
  • Version 7.0.2994

Deployment Type
Helm chart

*Originally created by @luisxkimo on 8/26/2024* **Describe the bug** Cannot access to array properties from a query to database in workflows components. **To Reproduce** Steps to reproduce the behavior: 1. Create new workflow and add "database query find one" component 2. Add Custom Javascript component, and try to access to one column of previous componente that returns an array **Expected behavior** If you access to the "returned value" from the query that is an array, save this in a variable like an array or at least save like an "string" **Screenshots** You can see here that from returned value "labels" as an array, the access to this in next component returns [object Object] ![image](https://github.com/user-attachments/assets/1f02eb06-7f4f-4fd1-bef8-a2e2fbd28b55) Here is the custom javascript code: ```javascript stringlabels={{local.components.monitor-find-one-1.returnValues.model.labels}} // if you use '{{local.components.monitor-find-one-1.returnValues.model.labels}}', then the string '[object Object]' is saved return stringlabels ``` **Desktop (please complete the following information):** - Browser: Edge - Version 7.0.2994 **Deployment Type** Helm chart
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#728