
I am trying to build a flow that emails links to files to selected users starting from Power Apps.
Power Apps provides two strings, one concatenating the IDs of the files I want to share (i.e. "137, 141, 154"), and one the emails.
Below are the actions in my flow:
However, the 'Apply to each control' doesn't like the way the file IDs are provisioned and the flow fails, giving me the following message:
"The source type/format 'Array' of the value '["137;141;154"]' is not convertible to type/format 'Integer/int64'."
I suspect that the 'Compose files' action as written array(triggerBody()['text_1']) is the problem, or at least needs to be followed by a different action that can provision the IDs in the right format... no idea which one.
Hi, @Salv
According to your description, you pas the '["137;141;154"]', and it need to number(int) format .
(1)If you pass the value is an array like ["137","141","154"]. You can use the Apply to each action to loop this array.
And you can use this code to convert each item to the number:
int(item())
(2)If you pass the value is a string type like this '["137;141;154"]' , you need to use this code to replace it and then split by ';'.
split(replace(replace(replace(YouString,'[','') ,']',''),'"',''),';')
This will return the array [137,141,154], and then you can use the "Apply to each" action to loop this array.
If I misunderstand what you mean, you can describe your needs and your expected outcomes in detail and give me some sample json so that we can better help you.
Best Regards,
Yueyun Zhang