0

Using the DataSource function

Hello :)

I was reading the Datasource function doc(https://support.klipfolio.com/hc/en-us/articles/216182577-DATASOURCE-function) but when i clicked the 

 

Also i was trying to emulate the sample: https://support.klipfolio.com/hc/en-us/articles/216183277-Example-Using-the-DATASOURCE-function-with-the-SWITCH-function

But i cant seem to make it work, is the  datasource_variable_name2 a variable and the DS1 a string? and the b9d641343b60e92af1da323eb3ec2820 & A2 string as well?

SWITCH ( datasource_variable_name2, "DS1", DATASOURCE( b9d641343b60e92af1da323eb3ec2820, "A2" ) , "DS2", DATASOURCE( 30adf78dfe69821cd78e45067e453230, "A2") case , value )

 

Thanx :)

2 comments

  • 0
    Avatar
    Meggan King

    Hello -

    Thanks for bringing that link to our attention. We unpublish articles when they are going through review or edits. I've removed the link to make it less confusing!

    In the switch example, the datasource_variable_name2 is a variable. In this example, the values of it are DS1 and DS2. The switch handles the logic of which data source to use. The long number is the data source id, the A2, A2 are both strings. 

    That example has just a single cell selected, however, it can be much more useful than that. You can put in A:A to select the entire column or 1:1 to select an entire row. From there, you can use the data in any formula. 

    The DATASOURCE function is great, but it can be a little slower to process. If you only have a few data sources, it would be easier to just use them in your formula. One good place to use DATASOURCE is to insert variable in your XPath. 

    If you share a screenshot of your formula, I can help with anything I see wrong. 

     

    Thanks,

    Meggan

     

  • 0
    Avatar
    David Sward

    I am also attempting to use the link to view the DATASOURCE function example, at least the link above, and it is still bad. 

    While the link is no longer on the DATASOURCE page, it would be nice to have an example of how the function works.

    Just an observation but 2 years is a long time for a doc review is it not?

    Thanks,

    David

Please sign in to leave a comment.