I have a problem taht I d jost can´t find the right solution for. I have a SharePoint list where I have to copy data from one list to another list (kind of a backup). One of the columns is a mulitple choice column, and this is where it gets tricky for me. I have read several articels and seen more than one video, but I still get errors on that field. The closest I came to a solution was an articel from Wonder Laura and I can easeliy get it to behave right as long as it is only one item, but as soon as I get it into a For each loop it goes wrong. My flow looks like this:
I am starting by initializin a variable with thw type Array
The I make an Apply to each and create an Append to array where I put in the multiple column (it is named "kl-editorer"). The value I am using in the Apply to each is @{outputs('Get_items')?['body/value']}
The I create an item, and use the variable in the multiple field as shown below.
The runs fine, but the result!!!! The field "KI-editorer" looks not very well 🤔
I am aware of that I might have done something wrong ewith the apply to each, but I can´t find out what. I have tried several different methods, but it always ends up in errors or like you see her. Can anyone of you give me a hint of what I am doing wrong?
/Frank
Denmark
Solved! Go to Solution.
Hi again @Mister_Shaik I did manage to get i fix for it. I ended up using a Select action and data is copyed as intended.
/Frank
Hi @venseben ,
If you're just copying the multi choice value to create a new item, then you can directly use the output from get item inside the create item.
Kind Regards,
Shaik Sha
________________________________________________________________________
If I have answered your question, please mark the post as Solved, as it helps other users find answers easily.
If you like my response, please give it a Thumbs Up.
Hi @Mister_Shaik and thx for taking time to answer, but I do no get it to work. If I do what you have done I get the error
The 'inputs.parameters' of workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details: The API operation does not allow writing a value for parameter
I have created the flow just as you, tak a look here:
If I make it different I get an apply to each, and that is not helping because it then gives me a item for each choice in the field. All I want is to copy the data from the mulitple choice field in list A to a multiple choice filed in list B, but it still gives me troubles.
/Frank
Hi again @Mister_Shaik I did manage to get i fix for it. I ended up using a Select action and data is copyed as intended.
/Frank
Hi @venseben
I am having the same issue where the multi-select value is not getting copied.
I am trying your selecte method, however, I am not able to populate the select output in Create Item field
Have you used Initialize Array and Append to array step as well? I don't know if you still have this flow working or if you can assist me on this but any help would be much appreciated
Hi @om3r Yes, my flow is running like a charm every Saturday with no errors. As far as I can see from your screenshot, you have to put in a Select action before the Create item action, otherwise you will not be able to fetch any data. Just like below.
/Frank
Hi Frank,
Thank you.
I will now try creating the flow as you said, but before could you please advise if you have also used Initialise & Append to array?
Is it possible for you to put a screenshot of your flow?
No, I have no steps before this action. The only step is that I am deleting all content in the list before I am creating the list items again. No use of arrays or anything. Just what you can see on the screenshot. It is a kind of backup, where i make copyes af round 1000 items in a list, so it is all data from one list to another. Sometimes I wonder why customers want that kind of solutions. I have never seen data from SharePoint just disappear without any reason 🤔
/Frank
I have tried that as well. As far as i can see, you have an apply to each inside an apply to each. I think I ended up moving the select and Create item out of the apply to each, and got it working that way. I think it is because you are trying to select from a current item (your apply to each 2) instead of the value in your first apply to each. That is the only diffrence I see in thye way you have build your solution.
/Frank
If I am creating outside the apply to each after select action, it is not giving the "output" value from the select action.
If I am creating it inside the apply to each then I am getting the Output value from the select action.
And creating a flow like this is giving me the error!
I am struck at this stage and unable to find a proper solution for this.
You need to drag your actions out of your "Apply to each 2", and into your "Apply to each". The proplem is that you are trying to make an evaluation of an boject, and it must be an array. What you have done there will never work I am afraid. Your "Apply to each 2" is not being evaluated on an array, but an object. "Value" is an array, "Current item" is an object from what I know.
/Frank
Fantastic - have a great day 👍
/Frank
User | Count |
---|---|
23 | |
15 | |
14 | |
10 | |
9 |
User | Count |
---|---|
45 | |
29 | |
25 | |
24 | |
24 |