Question

How do I set an optional Sub-Zap input parameter with a default value without using a Path?

  • 28 November 2023
  • 2 replies
  • 57 views

Userlevel 1

Creating a subzap - I want to be able to make an input parameter optional and use a default value when one is not explicitly specified, but without using a path. In this particular case, I know the value will not contain a space.

My first thought was to use “Split Text” -- appending the default value to the possibly empty parameter, split the string on [:space:], and use the first word.

However when testing, the missing parameter is shown as “missing sample data” and Split Text returns “missing”. Not so useful.

Is there any way to do this in one step?

Tom

 

 

 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +14

Hi @bridgman 

Good question.

Perhaps try this Zap action: Formatter > Text > Default Value

Userlevel 1

Thank you! I will take a look.