Hi @DamienP !
Have you tried using the square brackets without quotes?
"condition": "setup.answers.Survey3, false],
Give that a shot and let me know how it goes.
Hubert
Hi @qHubert !
Thanks for your response.
I gave it a shot but the json is invalid and build failed.
I tried this too:
"condition": "setup.answers.Survey3", false],
but build failed too with this error => json: cannot unmarshal array into Go struct field V3WorkflowStep.steps.condition of type string
Damien
Oh, right. Of course.
Let me look into this. Are you trying to conditionally create something? If so, what and what else are you doing in solutionExecution.json?
Yes, the goal is to have multiple checkbox in the setup page and to create the corresponding project.
For tests i have simplified my solutionExecution.json to one project. ( i m aware i should always have at least 2 step, but the error occur even if i have more “static” step).
{
"apiVersion": "workflow.v3",
"setup": {
"formFilePath": "Resources/testd.json"
},
"config": {
"description": "This is an example for building a survey resource",
"disableGuidanceSidebar": true
},
"steps": e
{
"id": "createSurvey",
"type": "Create",
"condition": "osetup.answers.Survey3, false]",
"config": {
"apiVersion": "survey.v0",
"templateFilePath": "Resources/survey.json",
"transformationFilePath": "Resources/modifySurvey.js"
}
},
{
"id": "locationSetting",
"type": "SetLocation",
"config": {
"setLocation": {
"type": "Product",
"section": "EditSurvey",
"sectionData": {
"surveyId": "createSurvey.surveyId"
}
}
},
"dependencies": i"createSurvey"]
}
]
}
Hi,
I just need a way to conditionnaly create ressource.
I tried to do it in the transformation file by returning a null ressource when conditions are met but that's not working either.
Do you know any other way to do it or spot something wrong in my code @qHubert ?
Thanks