m

    Mitchell Bregman

    1 year ago
    Hey there, is this possible? I want to default out another parameters based on a previous parameter. In this example, let’s say
    x
    is a string and I want to
    .lower()
    it.
    flow = Flow("some flow")
    with flow:
        x = Parameter("x")
        y = Parameter("y", default=x.foo())
    The use case I will be doing this for is date specification and building dynamic dates based on a main driving parameter
    Michael Adkins

    Michael Adkins

    1 year ago
    Hmm, parameter values need to be serializable so I don’t think you can set a default that’s dependent on a runtime value like this.
    Is there a case where you’d want the user to be able to configure
    y
    independently of
    x
    ? If you want to have
    y
    be based on
    x
    you can just use a normal task
    m

    Mitchell Bregman

    1 year ago
    yeah, thats what I will end up doing
    thanks so much, was just curious
    but yes, there is a case where
    y
    can be independent…. i will just have some handling around that
    and default
    y
    to None
    Michael Adkins

    Michael Adkins

    1 year ago
    No problem! It’d be cool if we could take callables there but since we need to display defaults in the UI and such it becomes a bit of a security concern to execute the code on our end.
    @Jim Crist-Harif — perhaps a possible use-case for the “secure execution” model 🙂