I'm stuck with the following problem:
I would like to change a property value of an object-type variable.
I read this amazing blog: http://johnliu.net/blog/2017/7/json-cheatsheet-for-microsoft-flow
These are my initialises:
Here I would like to change the value of the property "test".
As you can see, I would like to use the value of variable "dc", as the name of the property.
This works, but using the value of the variable not..
Could someone help me out?
Could you provide more details about your needs?
Obviously, using variables here instead of property names is not in line with the specification.
There is no similar way to set the property value in the article.
It seems that you can only reference property names to set property values. And the property name compulsory is a constant, you cannot use variables.
Thank you for your answer.
This was just a little test, because I have a "big" program where I would've liked to implement this.
The program does the following:
I have a Sharepoint List with a lot of data (points from the evalutions of the students at school).
Each evaluation belongs to a theme. There are like 20 different themes.
In the SP list, there are columns like studentnumber, theme, score, maximum_score, ...
I iterate through each student, and within this iteration I iterate through each SP list item from this student.
At this moment, I have many variables (for each theme a variable total_score, total_max_score) and many conditions and switch cases.. All the initialises, and the resets after each iteration..
The flow is getting too big, at this point each action I want to make takes like 5 seconds to appear.
In the end, I need to calculate all the percentages from each theme and make reports.
That's why I hoped to get this working.
If this would be possible, I can get a SP list item, check the 'theme' and then iterate through all the SP list items with the same theme (from the specific student). And then write the percentage to the variable-object.
Then I would only need 2 variables instead of 20, and much less conditions and cases..
My object-variable would be initialised like this and I would overwrite the property value of each theme (if the theme was evaluated):
"theme_1" : 0,
"theme_2" : 0,
I hope you can make me a bit wiser, because it's not easy anymore.