Select to view content in your preferred language

Udated Demographics for BA API

3933
7
Jump to solution
08-20-2013 11:35 AM
MattPohl
Frequent Contributor
Hello-

Not sure if this is the right Forum to post this on but Ill give it a try. I am new to the BA API and I am using it inside a flex application to generate demographic reports. I have got it working fairly well except I am only getting 2010/2015 demographics. If I use BA Online I can get the updated demographics (2013/2018). Even in the BA API for Flex Samples page: http://help.arcgis.com/en/businessanalyst/online%20apis/apis/flex/samples/index.html   all the reports are from the 2010/2015 dataset. Can I use the updated demographics some how? Any thoughts would be appreciated.

Thanks,

Matt
0 Kudos
1 Solution

Accepted Solutions
MattPohl
Frequent Contributor
Well I think I finally got this figured out. Once I added the activeDatasetID parameter to both the getReportTemplatesTask, and to the executeReportTask, reports came across as expected. 

options are to change to "USACensus2010" ??? Census 2010-based boundaries, "USA2012" ??? Census 2010-based boundaries (Esri 2012/2017). Not exactly sure but I would think "USA2013" would likely reference the recently released Esri 2013/2018 data update.


Jason, you were right on these options for posible ID values. Thanks for you help on this. Even though I didn't use your exact code, you pointed me in the right direction. There is documentaion to the activeDatasetID parameter as it relates to the BAO API for Flex located here: http://help.arcgis.com/en/businessanalyst/online%20apis/apis/flex/Concepts/index.htm?datasets.html

Matt

View solution in original post

0 Kudos
7 Replies
Jason_RobinsonRobinson
Esri Regular Contributor
Hello-

Not sure if this is the right Forum to post this on but Ill give it a try. I am new to the BA API and I am using it inside a flex application to generate demographic reports. I have got it working fairly well except I am only getting 2010/2015 demographics. If I use BA Online I can get the updated demographics (2013/2018). Even in the BA API for Flex Samples page: http://help.arcgis.com/en/businessanalyst/online%20apis/apis/flex/samples/index.html   all the reports are from the 2010/2015 dataset. Can I use the updated demographics some how? Any thoughts would be appreciated.

Thanks,

Matt


Matt,

Most likely the DatasetID is "USA" which is referencing the census 2000-based Esri 2010/2015 dataset.  Other options are to change to "USACensus2010" �?? Census 2010-based boundaries,   "USA2012" �?? Census 2010-based boundaries (Esri 2012/2017).  Not exactly sure but I would think "USA2013" would likely reference the recently released Esri 2013/2018 data update.

Regards,
Jason R.
0 Kudos
MattPohl
Frequent Contributor
Jason-

Thanks for the reply. I am not sure where to make the change on the DataSetID... is this found somewhere inside the BA referenced library (the BA API)? Nowhere in my application code can I find this. A point in the right direction would be greatly appreciated. Thanks in advance.

Matt
0 Kudos
Jason_RobinsonRobinson
Esri Regular Contributor
Jason-

Thanks for the reply. I am not sure where to make the change on the DataSetID... is this found somewhere inside the BA referenced library (the BA API)? Nowhere in my application code can I find this. A point in the right direction would be greatly appreciated. Thanks in advance.

Matt


Matt,

I am not totally sure myself I do not support the BAO API but I have seen this come up with clients using the BAO API in the past.  I suspect the below sample on the URL you posted if you go to utility tasks and then Get Templates and the bolded line item below might be example:

private function executeTask() : void
            {   
                lblGuide.text = "Retrieving all the available datasets.";
               
                var getDatasetsTask : GetDatasetsTask = new GetDatasetsTask();
                getDatasetsTask.token = token;
                getDatasetsTask.execute(new mx.rpc.Responder(
                    function(event:BATaskCompletedEvent):void {
                        datasetCB.dataProvider = new ArrayCollection(event.result);
                        datasetCB.selectedItem = "USA";
                        getReportTemplates();
                    },
                    function(event:FaultEvent):void {
                        Alert.show("There was an error executing the Get Datasets task: " + event.fault.faultString);
                    }));
            }
           
            /**
             * Retrieve the report templates for the chosen dataset.
             * By default, this task returns the report templates for USA.
             */

I'll track someone down who really knows the BAO API stuff to weigh in here.

Regards,
Jason R.
0 Kudos
MattPohl
Frequent Contributor
Jason,

Thanks again for helping me out with this. I am not able to get the code you suggested to work correctly. I am using this functionality inside a custom widget for the Flexviewer. I have attached a zipped .txt file with my mxml code in hopes that maybe you could show me where changes need to be made. I will continue to play around with this in the meantime and hopefully will get a bit closer. Thanks again for the help.

Matt
0 Kudos
Jason_RobinsonRobinson
Esri Regular Contributor
Jason,

Thanks again for helping me out with this. I am not able to get the code you suggested to work correctly. I am using this functionality inside a custom widget for the Flexviewer. I have attached a zipped .txt file with my mxml code in hopes that maybe you could show me where changes need to be made. I will continue to play around with this in the meantime and hopefully will get a bit closer. Thanks again for the help.

Matt


Matt,

Let me track someone down who can take a look at your attached code.  I did take a look at it but admittedly it is not in the wheel house of my skill set.

Regards,
Jason R.
0 Kudos
MattPohl
Frequent Contributor
Well I think I finally got this figured out. Once I added the activeDatasetID parameter to both the getReportTemplatesTask, and to the executeReportTask, reports came across as expected. 

options are to change to "USACensus2010" ??? Census 2010-based boundaries, "USA2012" ??? Census 2010-based boundaries (Esri 2012/2017). Not exactly sure but I would think "USA2013" would likely reference the recently released Esri 2013/2018 data update.


Jason, you were right on these options for posible ID values. Thanks for you help on this. Even though I didn't use your exact code, you pointed me in the right direction. There is documentaion to the activeDatasetID parameter as it relates to the BAO API for Flex located here: http://help.arcgis.com/en/businessanalyst/online%20apis/apis/flex/Concepts/index.htm?datasets.html

Matt
0 Kudos
Jason_RobinsonRobinson
Esri Regular Contributor
Well I think I finally got this figured out. Once I added the activeDatasetID parameter to both the getReportTemplatesTask, and to the executeReportTask, reports came across as expected. 



Jason, you were right on these options for posible ID values. Thanks for you help on this. Even though I didn't use your exact code, you pointed me in the right direction. There is documentaion to the activeDatasetID parameter as it relates to the BAO API for Flex located here: http://help.arcgis.com/en/businessanalyst/online%20apis/apis/flex/Concepts/index.htm?datasets.html

Matt


Matt,

Glad to hear!

Jason R.
0 Kudos