Planning Analytics

Planning Analytics

Get AI-infused integrated business planning

 View Only
  • 1.  PAx API VBA Error

    Posted Thu May 06, 2021 11:49 AM
    Hello,

    we are using the PAx API in our VBA code. In some Excel files we make requests to the TM1 REST-API using the following code:

    Reporting.GetConnection(sPAW_URL).Get("tm1/" & sDatabase & "/api/v1/" & endpoint & "?" & params)​


    This code works for every user of the Excel files but for one. For this particular user the Call fails with "Runtime Error 91 Object Variable or With block not set".
    Otherwise everything works. the user can refresh the sheet or use Formulas like DBRW, DBSS, and calls to the PAx API like Reporting.RefreshSheet work perfectly fine.

    We are stumped by this problem, as the addin appears to work and just fails to work for one particular user when doing REST-API calls using the PAx API.

    I hope somebody here can help with this issue.

    Best regards 
    Constantin


    ------------------------------
    Constantin Budin
    ------------------------------

    #PlanningAnalyticswithWatson


  • 2.  RE: PAx API VBA Error

    Posted Thu May 06, 2021 11:58 AM
    We have found the issue to be a trailing "/". 
    "https://test-paw/" would fail
    "https://test-paw" would work

    Why does a trailing "/" only crashes on some systems?

    ------------------------------
    Constantin Budin
    ------------------------------



  • 3.  RE: PAx API VBA Error

    Posted Thu May 06, 2021 05:22 PM
    Maybe related to their default browser?




  • 4.  RE: PAx API VBA Error

    Posted Fri May 07, 2021 02:49 AM
    Edited by System Admin Fri January 20, 2023 04:41 PM
    We have tried that and that is not it.

    We now have three types of users:
    • User for which both "https://test-paw/" and "https://test-paw" work
    • Users for which only "https://test-paw" works 
    • Users for which only "https://test-paw/" works
    As it stands the REST-API Calls are unusable as we have no clue, which setting causes this difference in behaviour.

    ------------------------------
    Constantin Budin
    ------------------------------



  • 5.  RE: PAx API VBA Error

    Posted Fri May 14, 2021 11:21 AM
    Edited by System Admin Fri January 20, 2023 04:12 PM
    GetConnection(sPAW_URL)​

    Correlates back to the Excel user's defined set of connections, which is likely the environmental factor.  It does not work in full isolation of the connections as configured.

    In terms of the REST VBA facility in the PA for Excel API, I would agree that it is very much a 'raw power tool' in it's current state; we're always interested in making improvements here - Our work for the API activity is primarily feedback/demand driven.  I'll be sure to bring this into those discussions as we iterate. 



    ------------------------------
    Ted Phillips
    ------------------------------