IBM Apptio

Apptio

A place for Apptio product users to learn, connect, share and grow together.


#Aspera
#Apptio
#Automation
#FinOps
#Apptio
#ITAutomation
 View Only
  • 1.  CopyTable Function with Dynamic Project Destination

    Posted 08/03/16 01:50 PM

    Good Afternoon,

     

    I'm wondering if there is a to make the destination project in a CopyTable Function dynamic.  I have a button that will copy a table from Project A to Project B.  There a need to send the same table to newly created What if Project C.  Right now those projects are hard coded within the function.  I want to another person to be able to update the destination project without having touch the script in the button(s).  Off hand I was thinking I could let them update a column in a table with a project name, then somehow look up that value in the function.  Has anyone attempted to do this or know of a way I can accomplish this.

     

    Thanks for any help,

     

    Jeff





    #CostingStandard(CT-Foundation)


  • 2.  Re: CopyTable Function with Dynamic Project Destination

    Posted 08/05/16 03:31 PM

    We can dynamically set any of the argument values of the CopyTable() function.

     

    This is handy: It lets us use DomainName() and ProjectName() to sidestep having to hard-code some of the argument values.

     

    For instance:

    CopyTable("<%=DomainName()%>:<%=ProjectName()%>/Reports/<%=CurrentDate("ppp:ffff")%>/CostModels/Default/.TableTransform:Timestamp/.Summary/!SORT/!LIMIT%5B0%2C2147483647%2Cadd_total%5D/!LIMIT_COLUMNS%5B%5D/","<%=DomainName()%>:<%=ProjectName()%>","Timestamp2","<%=CurrentDate("ppp:ffff")%>")

     

    The CopyTable() function is normally placed in the Server Action field in a report button's Properties.

     

    But I don't know a way for the button to dynamically pull in a destination project name from a cell in a data table, because a button component (unlike an HTML component) in a report does not have an object context.

     

    An HTML component can be configured to look just like a report button.

    Then we can set its object context, which grants the component full access to any relevant data tables.

    It can then pull in the name of a destination project from a table cell.

    But I don't think CopyTable() works when placed in an HTML component.


    #CostingStandard(CT-Foundation)


  • 3.  Re: CopyTable Function with Dynamic Project Destination

    Posted 08/05/16 07:02 PM

    BTW - @Chris Davidson you can provide an object context to a button. You just create a table with the right context, then right click and show the full datapath. Copy the datapath and then goto the button and right click and select Edit Datapath and paste it there. We used to do a lot of this for sending emails using a button where we needed the context of the All Business Services object.

     

    But for the question the Jeffrey had - he doesn't need object context since the global datalookup works within apptioscript just fine.

     

    Regards,

    -Sanjay


    #CostingStandard(CT-Foundation)


  • 4.  Re: CopyTable Function with Dynamic Project Destination
    Best Answer

    Posted 08/05/16 05:57 PM

    Hi Jeffrey,

     

    You can most certainly have dynamic project or table targets. All you need is a table with the data and you use global datalookup to pull the values you need. For example:

    if you have a dataset: 

    IDProject Name
    Target1Platform Test
    Target2Cost Transparency

     

    You can put the following Server Action in a button:

    CopyTable("<%=DomainName()%>:<%=ProjectName()%>/Reports/<%=CurrentDate("ppp:ffff")%>/CostModels/Default/.TableTransform:Test Table/.Summary/!SORT/!LIMIT%5B0%2C2147483647%2Cadd_total%5D/!LIMIT_COLUMNS%5B%5D/","<%=DomainName()%>:<%=Project Targets:Project Name[ID="Target1"]%>","Timestamp2","<%=CurrentDate("ppp:ffff")%>")

    The apptio script that pulls the data uses global data lookup. Here is how to understand it:

    Project Targets:Project Name[ID="Target1"]

    Basically means in the dataset Project Targets, give me the value of the row from the column Project Name where ID="Target1"

    (you can have multiple conditions).

     

    Hit me up if you have questions.


    #CostingStandard(CT-Foundation)


  • 5.  Re: CopyTable Function with Dynamic Project Destination

    Posted 08/08/16 10:03 AM

    Sanjay,

     

    This worked perfectly for what I was attempting to do.  We utilize a project for data entry that copies tables into our Cost Transparency project when data needs to be updated.  However, whenever we try to create a what if project, the data entry project always pointed to our CT project.  Now we will be able to create a What if data entry project to go along with our CT What if with this new functionality!!!.  This will save our TBMAs from having to learn each table to manually upload change for the what if, when their current day process utilize the "structured" process in place.  This is a big win for us

     

    Thanks so much,

     

    Jeff


    #CostingStandard(CT-Foundation)