- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Dec 12, 2023 01:00 AM
Hi,
I've been trying to learn and build a script with the help of ChatGPT. The script creates a report in Clockify and all works fine until I replace the value input variable from a fixed value to a feiled in the base from a previous step.
The value is just a string but is actually a lookup from another table. I've tried to use a formula in another field and use that but both result in the error seen in the screen shot.
I feel like I'm so close, any advise ?
Solved! Go to Solution.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Dec 12, 2023 08:31 AM - edited ‎Dec 12, 2023 08:51 AM
Looks like you don't need the [] around projectId in your projects filter as it's already an array. Also, not necessary, but if that is the case I would update that variable to be called projectIds as it might help you keep track.
To clarify;
//an array of strings with length 1
const projectId = ['abcdefg'];
console.log(projectId);
//returns ['abcdefg']
console.log([projectId]);
returns [['abdcedfg']]

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Dec 12, 2023 08:31 AM - edited ‎Dec 12, 2023 08:51 AM
Looks like you don't need the [] around projectId in your projects filter as it's already an array. Also, not necessary, but if that is the case I would update that variable to be called projectIds as it might help you keep track.
To clarify;
//an array of strings with length 1
const projectId = ['abcdefg'];
console.log(projectId);
//returns ['abcdefg']
console.log([projectId]);
returns [['abdcedfg']]
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Dec 12, 2023 08:53 PM
Nice one Jack. Exactly right. Thanks for your help and explanation
