Skip to content

Conversation

@kevinkim-ogp
Copy link
Contributor

@kevinkim-ogp kevinkim-ogp commented Jun 2, 2025

TL;DR

This PR adds support for wildcard syntax in parameter computation, allowing users to use column values from find multiple rows / get table rows steps in subsequent steps.

What changed?

  • Get all values from an array: {{step.id.arrayProp.*}}
  • Get specific properties from objects in an array: {{step.id.arrayOfObjects.*.propertyName}}

The implementation includes:

  • Updated regex patterns to recognise wildcards in variable paths
  • Added logic to handle wildcard substitution in compute-parameters.ts
  • Comprehensive test cases for various wildcard scenarios

This enhancement provides more flexibility when working with array data in workflow steps.

How to test?

Setup

  • Create a Tile find multiple row step and an Excel get table rows step successfully
  • Create another step e.g., Postman / Telegram / Slack

Test

  • Use variable for column values in your action, test the step and verify that the output uses the correct values
  • Update the Tile or Excel sheet, re-run the action, verify output uses the updated values

Screenshots

Screen Recording 2025-06-02 at 6.25.58 PM.mov (uploaded via Graphite)

@kevinkim-ogp kevinkim-ogp changed the title chore: compute parameters with wildcard PLU-489 [FIND-MULTIPLE-ROWS-7]: Compute parameters with wildcard Jun 2, 2025
@linear
Copy link

linear bot commented Jun 2, 2025

@kevinkim-ogp kevinkim-ogp changed the base branch from chore/find-multiple-rows/dynamic-columns-ui to graphite-base/1029 June 2, 2025 10:10
@kevinkim-ogp kevinkim-ogp force-pushed the chore/find-multiple-rows/compute-wildcard-parameters branch from 21f1a5b to 6055f13 Compare June 2, 2025 10:19
@datadog-opengovsg
Copy link

datadog-opengovsg bot commented Jun 2, 2025

Datadog Report

Branch report: chore/find-multiple-rows/compute-wildcard-parameters
Commit report: 3e38748
Test service: plumber

✅ 0 Failed, 852 Passed, 0 Skipped, 2m 39.78s Total Time
⬆️ Test Sessions change in coverage: 1 increased (+0.44%)

@kevinkim-ogp kevinkim-ogp changed the base branch from graphite-base/1029 to chore/find-multiple-rows/dynamic-columns-ui June 4, 2025 03:57
@kevinkim-ogp kevinkim-ogp marked this pull request as ready for review June 5, 2025 00:42
@kevinkim-ogp kevinkim-ogp requested a review from a team as a code owner June 5, 2025 00:43
@kevinkim-ogp kevinkim-ogp changed the base branch from chore/find-multiple-rows/dynamic-columns-ui to graphite-base/1029 June 5, 2025 01:22
@kevinkim-ogp kevinkim-ogp force-pushed the chore/find-multiple-rows/compute-wildcard-parameters branch from 6055f13 to b48072a Compare June 5, 2025 06:22
@kevinkim-ogp kevinkim-ogp changed the base branch from graphite-base/1029 to chore/find-multiple-rows/dynamic-columns-ui June 5, 2025 06:22
Copy link
Contributor

BugBot run

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ BugBot reviewed your changes and found no bugs!


BugBot free trial expires on June 9, 2025
You have used $0.00 of your $1.00 spend limit so far. Manage your spend limit in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎


const variableRegExp =
/({{step\.[\da-f]{8}-(?:[\da-f]{4}-){3}[\da-f]{12}(?:\.[\da-zA-Z-_ ]+)+}})/g
/({{step\.[\da-f]{8}-(?:[\da-f]{4}-){3}[\da-f]{12}(?:\.[\w* -]+)+}})/g
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be slightly stricter to enforce that asterisk (*) must be the only character in the segment

valid: {{step.00000000-0000-0000-0000-000000000000.*.abc}}
invalid: {{step.00000000-0000-0000-0000-000000000000.def*.abc}}

Suggested change
/({{step\.[\da-f]{8}-(?:[\da-f]{4}-){3}[\da-f]{12}(?:\.[\w* -]+)+}})/g
/({{step\.[\da-f]{8}-(?:[\da-f]{4}-){3}[\da-f]{12}(?:\.([\w -]+|\*))+}})/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does not enforce that asterisk cannot be in the last segment. for that the check can be done later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated regex and added helper func to validate the step variable.
we only allow 1 wildcard and it cannot be at the start or end of the variable segment, example

invalid: {{step.00000000-0000-0000-0000-000000000000.*.abc}}
invalid: {{step.00000000-0000-0000-0000-000000000000.abc.*}}
invalid: {{step.00000000-0000-0000-0000-000000000000.abc*.def.*.ghi}}
valid: {{step.00000000-0000-0000-0000-000000000000.abc.*.def}}

return {
before: arr.slice(0, wildcardIndex).join('.'),
after: arr.slice(wildcardIndex + 1).join('.'),
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are there edge cases to be handled here?

? base
: [base]

return values.join(`${GET_ALL_SEPARATOR} `)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this break if values contain comma?

@kevinkim-ogp kevinkim-ogp changed the base branch from chore/find-multiple-rows/dynamic-columns-ui to graphite-base/1029 June 5, 2025 08:32
@kevinkim-ogp kevinkim-ogp force-pushed the chore/find-multiple-rows/compute-wildcard-parameters branch from b48072a to 92144a9 Compare June 5, 2025 12:26
@kevinkim-ogp kevinkim-ogp changed the base branch from graphite-base/1029 to chore/find-multiple-rows/dynamic-columns-ui June 5, 2025 12:27
@kevinkim-ogp kevinkim-ogp changed the base branch from chore/find-multiple-rows/dynamic-columns-ui to graphite-base/1029 June 11, 2025 06:29
@kevinkim-ogp kevinkim-ogp force-pushed the chore/find-multiple-rows/compute-wildcard-parameters branch from 92144a9 to 3e38748 Compare June 11, 2025 14:50
@kevinkim-ogp kevinkim-ogp changed the base branch from graphite-base/1029 to chore/find-multiple-rows/dynamic-columns-ui June 11, 2025 14:50
@kevinkim-ogp kevinkim-ogp changed the base branch from chore/find-multiple-rows/dynamic-columns-ui to graphite-base/1029 June 18, 2025 06:03
@kevinkim-ogp
Copy link
Contributor Author

closing this PR first, we are not allowing users to select the column variable in the find multiple rows output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants