Market Value on Fund

Options

Folks…need some help. I have designed an adaptive card that shows up on the fund page. I am able to pull basic fund data but am looking to pull market value from an outside source (excel, sharepoint) by matching on the fund id number. The problem I am having finding the corresponding row in the external sheet. Any suggestions on how to pull this data? Thx

Comments

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Bob Rickards
    if the external source is an excel file that you have access to modify, make the range in the excel as table, then you can get row in a table by a “key”, which is your fund id.

    if the external source is sharepoint, you can use ODATA Filter.

  • @Alex Wong Thanks for the help…I have connected to the SharePoint list…can pull back the column with the corresponding data but am having a formatting issue. Data shows up like this:

    16120d2efc3c9448aa82da28ab40bba4-huge-im

    I have tried to format by saving as a string then format as a number (Currency) but then I get this issue.

    b7a5d56f5715e9a3a81396d45bc74744-huge-im

    I have tried several different ways to work around this with no avail. Is it something on the sheet side? I know its going to be some simple solution. Any help is appreciated.

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Bob Rickards
    show a screenshot of the output from the action which you are getting the “number” that you are trying to do formating, so I can see what the data type is you are working with before suggesting what expression to use.

    I'm assuming your data type is probably string and the dollar sign is part of the string, if that's the case, you may want to update your SP list data type if you want better handling.. or leave it but will need to do a “replace” first. But let's start with a screenshot

  • @Alex Wong Thx…here is the top part of the flow.

    4bc3017cefb2ac4db98959e3dfbb377b-huge-im
    95fac807211196cfb9244f643e4cc1c7-huge-im

    I have tried saving as a variable then saving that variable as a integer to no avail. I even tried adding the “=” before the number on my excel sheet. I have tried formatNumber(), int(). Its a string I just can get it to go to a number. The first compose shows this…

    6fae672053064a85e52f5b511d5892d6-huge-im

    Second compose fails.

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Bob Rickards
    need the screenshot for the Get a row action's output where the 30533.42 came from

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Bob Rickards
    need the output body. your screenshot cuts off with only 4 lines shown..

    this is where the new “view” doesn't do well.. can't display the output of the action well..

    e041c663875fc33fb3ed807ed1b73f8f-huge-im

    once back to the “old view”, click on “Show raw outputs” and screenshot where the “body” begins

    036f6343e24f763f67690bb662f73cc4-huge-im
    05cd8aa65fa44c7fc645b24145528062-huge-im
  • 6d9f04e709c40458ae8dc1e32787ba32-huge-im

    @Alex Wong Sorry…here you go…

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Bob Rickards
    given that MarketValue is a string, the expression is:

    if(empty(outputs('Get_a_row')?['body/MarketValue']), '', formatNumber(float(outputs('Get_a_row')?['body/MarketValue']), 'c'))

    this takes care of IF the MarketValue is blank (but not take care of if MarketValue is not a number.

    this use float() b/c your MarketValue can be decimal, as int() will not do decimal.

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    oh..by the way.. no need to put the expression in compose, just add it directly where you want to show the currency. (i.e. Email body)

  • @Alex Wong That worked! Thanks…so If I want to grab another column from the same sheet, do I follow the same process or can I just grab that date value?

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Bob Rickards
    the expression is specifically to format a decimal number as currency (locale specific). So if you want to format a Date, you will not use the same expression. If you want to format another decimal number as currency, then use the same expression, and replace the “outputs('Get_a_row')?['body/MarketValue']” with the other column's dynamic content.

Categories