Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a cook book example for indexing into optional array #16

Open
ekiernan opened this issue Dec 19, 2022 · 1 comment
Open

Make a cook book example for indexing into optional array #16

ekiernan opened this issue Dec 19, 2022 · 1 comment

Comments

@ekiernan
Copy link
Collaborator

No description provided.

@kayleemathews
Copy link
Collaborator

kayleemathews commented Feb 10, 2023

Notes from Jess

Create a pseudo None value:

if (false) {
  String? none = "None"
}

Use the pseudo-none (from above) to pass an optional input from an optional array to a subworkflow:
input_name = if defined(input_names) then select_first([input_names])[idx] else none
Note that this is only needed because we are indexing into the optional array input. The optional input must be made non-optional in order to index into it. If indexing into an optional array is not necessary, the optional input can be passed directly to the subworkflow.

There also might be an example in the Cromwell repo

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

No branches or pull requests

2 participants