calculate
(where, calc_expression, sql_format='standard')
lst_country = ["country1","country2","country3"]
for country in lst lst_country:
update_result = commune_flayer.calculate(where="nom = country", calc_expression={"field": "date_horaire", "value": provinces.attributes['date_horaire']})
Thanks
Solved! Go to Solution.
'nom = "{}"'.format(country)
It's good I finally found. It was necessary to declare this syntax
"nom = '{}'".format(country)
Thank you
'nom = "%s"' % country
# or
'nom = "{}"'.format(country)
Look up Python string formatting. Don't forget you need quotes around string values in where clauses.
'nom = "{}"'.format(country)
It's good I finally found. It was necessary to declare this syntax
"nom = '{}'".format(country)
Thank you