Skip to main content
Question

Passing field into Code Page -

  • January 25, 2019
  • 0 replies
  • 261 views

Forum|alt.badge.img+8
I'm trying to embed an iframe using IOL-- I'm able to embed the page I want but I'm not able to pass my qbase field (var state = $("catformula", xml).text();)   -- into the url below.....

I'm sure the issue is how I'm coding the "filtering" part of my URL --- &$filter=Accounts/Category eq 'qbasefield' 

Any help is greatly appreciated.....the code I'm using is listed below.


(function(){
  var querystring=document.location.search;

  if(/a=dr/i.test(querystring)) {
    //DISPLAY RECORD PAGE
    $("img[qbu=module]").closest("td").css("background-color","#FFFFFF");

    var apptoken = "dwnxji38j";
    $.ajaxSetup({data: {apptoken: apptoken}});
    var dbidAccounts = "bjec5";

    var promise = $.get(dbidAccounts, {
      act: "API_DoQuery",
      query: "{3.EX." + kRid + "}",
      clist: "21"
    });
    $.when(promise).then(function(xml) {
      var state = $("catformula", xml).text();

      var url = "";
      url += "https://app.powerbi.com/reportEmbed?reportId=802c3595-add7-4a48-aa725ea0&groupId=178e260d-ca8b-4...;
      url += "&$filter=\"Accounts%2FCategory\"eq'" + state + "'";   

      $("<iframe></iframe>")
        .attr("frameborder", "0")
        .attr("width", "100%")
        .attr("height", "450")
        .attr("src", url)
        .insertAfter("#sect_s14");
    }); 
 
  }
})();

This topic has been closed for replies.

Forum|alt.badge.img+8
  • Author
  • Registered
  • January 25, 2019
I got this working