I also jumped on the flows bandwagon. My first attempt I wait for the user to set geolocation and then I want to run a insert server action based on the lat and lon. Here is my code, but it does not act on the condition set.
<script is="dmx-flow" id="flow_golive" type="text/dmx-flow">[
{
run: {
action: "{{serverconnect_golive.load()}}",
name: "flow_golive",
output: true
}
},
{
run: {
action: "{{var_requestlocation.setValue(1)}}",
name: "flow_getlocation",
output: true
}
},
{
assign: {
value: "{{conditional_geogolive.geo_golive.coords.latitude}}",
name: "var_lat",
output: true
}
},
{
assign: {
value: "{{conditional_geogolive.geo_golive.coords.longitude}}",
name: "var_lon",
output: true
}
},
{
condition: {
if: "{{var_lat}}",
then: {
steps: {
run: {
action: "{{serverconnect_addstatus.load({lat: var_lat, lon: var_lon})}}"
}
}
}
}
}
]</script>
var_requestlocation.setValue(1) is used to display a conditional section which includes the geolocation componant. That sets the vars in the flow
Community Page
Last updated:
Last updated: