Passing Data From a Parent to Child SWF (Data Sharer Component)

In my previous post I demonstrated how to pass data from a parent to child SWF with the use of Flash Variables and the SWF Loader component. Today, I’m going to demonstrate how to accomplish the same functionality leveraging a free add-on component from Inovista.com called the “Data Sharer”.

One of the noticeable difference in this solution compared to the use of Flash Variables is that the child SWF does not have to load and initialize each time the parameter is changed.

How to do it:

1. Go to Inovista.com and download the free data sharer component

2. Add the data sharer component with Xcelsius’ Add-On Manager GUI or see Kalyan’s post “Using the command-line version of the Add-On Manger in Xcelsius 2008” to add using command line

3. Using the same child.xlf as in my previous example I have kept the same cell (E6) reserved for my parameter

4. Next add the data sharer component found under the “Inovista Other” category in your components list. Note that the component will not be visible at run time.

5. Give the data sharer a connection name. In my example I have used “salesman”

6. Check the “Import Values” box

7. Select the range of cells for  the “Import Data Cells”. In my example it is cell E6

8. Save and export your child SWF

9. Using the same parent.xls as in my previous example I have made a few changes to the underlying excel sheet.

a. Cell B5 should have the URL to your child SWF (Note that your SWF Loader Component will link to this URL)

b. Cell B7 should be reserved for the parameter that is going to be passed

10. Add the data sharer component to your canvas

11. Use the same connection name that you used in your child SWF. I used “salesman” in my example

12. Check the “Transmit Values” box

13. Select the range of cells for the “Transmit Data Cells”. In my example it is cell B7

14. Save and export your parent SWF. Note that the parent and child SWF should be located on the same server or file directory.

There you have it. Passing data from a Parent to Child SWF leveraging what I feel to be one of the best free components available to the Xcelsius community. There are a few quirks with this component so be sure to read the supporting documentation when implementing into a more complex model.

As always, please feel free to download the source files.

  • Pingback: Tweets that mention Passing Data From a Parent to Child SWF (Data Sharer Component) – MyXcelsius.Com -- Topsy.com()

  • Fred

    What URL would be used if the child is located on the BOE Server?

  • Hasna

    I downloaded the data sharer.i added it inside my xcelsius components.i did all the steps which u mentioned above.But when the selection in the listbox in the parent dashboard changes,the column chart in child dashboard is not changing.i was using the xls files(parent.xls inside DS_SOURCE.zip folder) which downloaded from here itself.iam using Xcelsius Enterprise 5.3.0.0.

    The logic inside data sharer is not working.Can u guide me how to make the data sharer to work properly for the same downloaded one.

    Thanks in advance

    • Hasna,

      I’m not sure what the problem may be. I have found that the data sharer component can be a bit finiky at times.

      Common problems to check for:

      1. Make sure the channel name is the same in both the parent and child connections

      2. Make sure you are using the correct data range ie.(transmit data in parent and import in child)

      3. Try not to have multiple instances of your model/connection open – for example if you export your model to PowerPoint and then view, make sure you are not in preview mode in Xcelsius. Best if you close Xcelsius all together. Same goes for the web. Try not to have my example up and running when you are working on yours. (This is one of those finiky issues I mentions above.)

      Hope that helps, if not take a look at the user manual that should have been included with your download. That may help guid you.

      Regards,
      Greg Wayne

      • Hasna

        Greg,

        My swf file and xcelsius were opened at the same time.That’s why data sharer was not working.After closing xcelsius, swf file was working properly.The third point in your reply solved my problem.Now swf file is working fine.

        Thank you for your response.

        Regards,
        Hasna

  • jb

    Hi, I was looking for the data sharer component on Inovista website but it seems to be unavailable now. Would you mind sending me the component file? would greatly appreciate it.

    thanks.

    jb

  • Raj

    Hi..

    Is it possible to open the child dashboard in the new window, instead of opening it in parent window.. I have 2 dashboard outside of BO and i need to pass a value between them..

    Thanks

  • Raj

    Hi..

    I downloaded the data sharer component, and it is working fine, if I call the child dashboard in parent.. but My problem is I want to open the child dashboard in new window.. is it possible…

    Thanks