cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gaca
Frequent Visitor

when item is created updated that item based on another sharepoint list

Hola People,

 

I would really appreciate your help, I am stuck with my flow cause I cant get the value of the array or the design is not the best or both. I am new at flow.

 

I have a list "database" that is updated by the user, that list have an amount value that is base in X currency and month.

 

I have another list "exchange rate" with 13 columns (one per each month and one that identy the differents X currencies).

 

So what i need is use flow to update the item created to the correspondance exchange rate base on the sharepoint list "exchange rate" according the X currency and X month from the item created.

 

so far i have done, this part that works ok, the arrail get the value according the filters (i have create a view for each month that i use as filter with the value month from the item created:

 

image.png

 

but now this is the issue i cant add that value, cause I cant extract from the array in order to update the item created.

 

image.pngt

 

Thanks in advance for any help and recomendations

1 ACCEPTED SOLUTION

Accepted Solutions
yashag2255
Dual Super User II
Dual Super User II

Hi @Gaca 

 

So as the Base and Month values will be unique for every item in the SP list, you can use ODATA queries to get the particular record. Please have a look at the screenshot and replicate. 

 

sppp.png

Hope This Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

7 REPLIES 7
yashag2255
Dual Super User II
Dual Super User II

Hi @Gaca , 

 

You want to update the value of the newly created Item (the one in database right?)

 

What all do you want to add in that? Do you want to create new items based on the exchange rates every month? 

 

Can you share more details on this? What is it that you are doing in the compose action and what do you want to pass in the Update Item?

 

 

Thanks,

Gaca
Frequent Visitor

Hi @yashag2255 .

 

yes when the user created the new item, in database i have a column call "ER" that one is not available for the user to introduce value through the entry form, but they completed currency (lets say for example "USD") and month (for example may that is number 5) --> all this happen in sharepoint list "database"

 

so when that item is created i want to go to the sharepoint list "exchange rate" look for the value (in this example) of USD and column 5, and bring that value and added to the item in sharepoint list "database" under the column "ER".

yashag2255
Dual Super User II
Dual Super User II

Hi @Gaca 

 

So as the Base and Month values will be unique for every item in the SP list, you can use ODATA queries to get the particular record. Please have a look at the screenshot and replicate. 

 

sppp.png

Hope This Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Gaca
Frequent Visitor

Thanks @yashag2255  is the same idea what i am building the first part, getitem I am doing it with the SP list "exchange rate" and filter the query ODATA with the Currency and the month (I have a column per month) related to that currency.

 

that part is ok when i tried the flow that array retrieve the value of the exchange rate I want. the issue is in the second part you have showed in "Update Item". in the field ER if i select ER (from when item is created) i am not updating any values right? what i want to do and i dont know how is that in ER should be the output of the query I am doing at the beggining in "Get Item".

 

yashag2255
Dual Super User II
Dual Super User II

Hi @Gaca , 

 

I have the ER field in my Database list and the Exchange List. In the Update Item, I am fetching the ER value from Exchange Rate list and updating the Database for that. Is this not what you want to do? 

 

Note: As  the Month and the Base are unique items there will be only on record that matches with these values and therefore the array being created will have just one value. 

 

I tested this in my environment. I created Items in the Exchange Rate with the Month numbers and the Base and the Exchange Rates. Now when I create an item in Database, I input the Amount, month and base and then the flow triggers to update the ER value in the Databse item. 

 

Note that the ER column in Database should not be hidden. Else, it won't show up in update item in Flow. 

 

Hope this Helps!

Gaca
Frequent Visitor

Yes! and thank you so much! works perfect but i have to change the structure of my sharepoint list "exchange rate" 

 

now is one column per month:

 

Currency         1               2         3          4      5

usd                2,6            2,7       2,8       2,9    3,0

 

and according this solution should be

 

Currency Month ER

usd           1         2.6

usd           2         2,7

usd          3          2,7

usd         4          2,9

usd        5           3,0

 

so if i do that change in the SP list structure, the solution works!

 

thank you so much! really, really appreciate it!

yashag2255
Dual Super User II
Dual Super User II

Hey @Gaca , 

 

Glad that it worked for you.  

 

If my reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Automate User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (56,827)