Parameters in concepts

Comments

3 comments

  • Avatar
    Prateek Kumar Baheti

    This feature is already available in Twist. If the underlying steps take parameters you can pass these parameters from the concept just like any other step. In the extract concept dialog you can enter the name of the parameter (as used in the step) and it will be added as a parameter to the concept.

    You can see extracting concept (latest version documentation) for more details.

  • Avatar
    Prateek Kumar Baheti

    You need to add the parameter names in quotes in the extract concept dialog.

  • Avatar
    Will Herrmann

    Alright, after a while of working with this, I found out that it is indeed possible, but the documentation doesn't make it clear that it is possible (I had read it before). For instance, the current example says that you can have Transfer "500" dollars from "SCB007" to "CIT090", but it never says that after you create the concept, you can put a different number in the scenario rather than just "500". In fact, I thought that this meant if I used this concept in a scenario that changing the value from "500" to "250" would mean changing the underlying concept. I'm glad to hear that this is not the case, but you can understand why I became confused.

    For what it's worth, I don't particularly care for the way that the tutorial sets things up because they you have weird things like 500=250. I think it would be better if the tutorial set it up so that the tutorial created a concept called Transfer "Amount" dollars from "FromAccount" to "ToAccount" and then explicitly showed that you can replace "Amount" with "500", "FromAccount" with "SCB007", and "ToAccount" with "CIT090" within the scenario. I think something like this would eliminate a lot of the confusion and prevent others, like me, from thinking that it's not possible to have parameters.

Please sign in to leave a comment.