I've set an entity inside a loop with many properties.
entity = {id:1, name:link, date:20201111, note:'',...}
I must use the 'setProperty' method to assign a value to each property.
My process now looks like this, which is uncomfortable to read
for (list) {
// reset entity
set(var(entity), json(id:'',name:'',...))
// set entity
setProperty(var(entity),key,val)
setProperty(var(entity),key,val)
setProperty(var(entity),key,val)
setProperty(var(entity),key,val)
setProperty(var(entity),key,val)
setProperty(var(entity),key,val)
Add a row into a table{
file:...,
table:...,
row:var(entity)
}
....
}
Is there a way to assign values in bulk?
or you can merge these assignment statements into a single statement?
Solved! Go to Solution.
Yes, you can just write a compose and define the whole thing in one step. Here is one like it in one of my flows:
Does that make sense?
Yes, you can just write a compose and define the whole thing in one step. Here is one like it in one of my flows:
Does that make sense?
Yes, this is what I was hoping for.
Thank you!
There may be a problem with my json splicing, I used to use the json function to convert the string to set the value.
It's horrible to write.😅
json('{
"name":"link",
"age":' + items('getAge') + ',' +
'"item":' + .....,
}')
// or use json(concat( ... ))
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
40 | |
36 | |
35 | |
34 | |
27 |
User | Count |
---|---|
39 | |
38 | |
34 | |
31 | |
25 |