SOLVED

Using Flow to get Lookup Column Value and use these Value to calculate

Brass Contributor

Hi there;

I am setting a Flow that can get the value of lookup column for using in Calculated Column. My List below:

 

List A: Target List, contain Currencies and Exchange Rate to VND (Called exRate) of the Currencies

Screen Shot 2019-07-02 at 11.03.11 AM.png

List B: Source List, Product List, want to calculate price in VND

Screen Shot 2019-07-02 at 10.44.58 AM.jpg

I want the Column ExchangeRate in List B to get data from Lookup Column "Currencies: exRate" and the "Price in VND" column calculate = OriPrice x ExchangeRate. And when the "ExRate" in List A change, then update "Exchange Rate" and "Price in VND" column  in List B.

 

I want to use MS Flow and also Sharepoint Workflow 2013.

 

Please give me an advice.

 

Thanks

8 Replies
best response confirmed by ca_rem (Brass Contributor)
Solution

Hi @ca_rem,

 

If the update occurs at the time of List B row creation then consider the following Flow steps:

  1. Trigger - SharePoint new item
  2. Action - SharePoint get items from List A
  3. Action - SharePoint update item in List B with lookup values in List A

If the updates need to occur on an ongoing basis then replace Trigger - SharePoint new item with Trigger - Schedule.

 

I hope this helps.

 

Norm

Thanks, @Norman Young 

Your instruction work completely. But I have a question. If use flow, in this case, do I have to keep the lookup column?

And Can you give more detailed instructions about the Trigger - Schedule if I want the updates need to occur on an ongoing basis?

Hope your reply.

Hi @ca_rem,

 

 do I have to keep the lookup column?

If I understand correctly, no the lookup column in List B is not required.

 

Can you give more detailed instructions about the Trigger - Schedule if I want the updates need to occur on an ongoing basis?

Sure. Use the Recurrence trigger and select a frequency that make sense for you and set the time zone appropriately. Example image below. 

Capture.PNG

 

I hope this helps.

 

Norm

@Norman Young . I'm setting up follow you instruction.

List A:

Screen Shot 2019-07-03 at 11.45.25 AM.png

List B: Screen Shot 2019-07-03 at 11.46.54 AM.png

My Flow: 

flow setting.jpg

I realize that I must keep these Lookup Column. So when you say it is not required, It surprised me. Am I missing something?

Hi @ca_rem,

 

List B ExchangeRate is not required. The value is coming from List A ExRate.

 

Make sense?

 

Norm

@Norman Young . Sorry for my slow understanding, can we use a formula with the value of List A ExRate directly?

Hi @ca_rem,

 

can we use a formula with the value of List A ExRate directly?

Yes.
Set the List B ExchangeRate to equal List A exRate * List B OriPrice.

 

I hope this helps.

 

Norm

1 best response

Accepted Solutions
best response confirmed by ca_rem (Brass Contributor)
Solution

Hi @ca_rem,

 

If the update occurs at the time of List B row creation then consider the following Flow steps:

  1. Trigger - SharePoint new item
  2. Action - SharePoint get items from List A
  3. Action - SharePoint update item in List B with lookup values in List A

If the updates need to occur on an ongoing basis then replace Trigger - SharePoint new item with Trigger - Schedule.

 

I hope this helps.

 

Norm

View solution in original post