Forum Discussion
AngelaIp thanks for the pointer! After some digging I found this thread: tree-view-in-main-grid
That got me in the right direction, but running into an issue of the method is blankly dumping the TGV into the form, not into the HTML container designated. I assume I'm missing something to grab the ID of the container or need to change out the document.createElement...? I've named the HTML container on the form as "tree_grid_viewer", but doesn't seem to work. The method is set to run onFormPopulated against the Form Body.
Any help would be appreciated!
[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:e1c9db47-f071-429f-99e2-ee20408a279e:type=javascript&text=%2F%2F%20eslint-disable-next-line%0D%0A%2F%2F%20%40ts-nocheck%0D%0Avar%20topWindow%20%3D%20aras.getMostTopWindowWithAras%28window%29%3B%0D%0Avar%20tgvdIdParam%3B%0D%0Avar%20startConditionProviderParam%3B%0D%0Avar%20parametersProviderParam%3B%0D%0A%0D%0AtgvdIdParam%20%3D%20%27tgvdId%3D60354DB4DEA04643818D20290DC967DC%27%3B%0D%0AstartConditionProviderParam%20%3D%20%27startConditionProvider%3DItemDefault%28%7B%22id%22%3A%22id%22%7D%29%27%3B%0D%0A%0D%0Avar%20tgvUrl%20%3D%20aras.getBaseURL%28%0D%0A%09%27%2FModules%2Faras.innovator.TreeGridView%2FViews%2FMainPage.html%3F%27%0D%0A%29%3B%0D%0Avar%20allParams%20%3D%20%5B%0D%0A%09tgvdIdParam%2C%0D%0A%09startConditionProviderParam%2C%0D%0A%09parametersProviderParam%0D%0A%5D%3B%0D%0Afor%20%28var%20i%20%3D%200%3B%20i%20%3C%20allParams.length%3B%20i%2B%2B%29%20%7B%0D%0A%09if%20%28allParams%5Bi%5D%29%20%7B%0D%0A%09%09tgvUrl%20%2B%3D%20%28i%20%3D%3D%3D%200%20%3F%20%27%27%20%3A%20%27%26%27%29%20%2B%20allParams%5Bi%5D%3B%0D%0A%09%7D%0D%0A%7D%0D%0A%0D%0Avar%20iframe%20%3D%20document.createElement%28%27iframe%27%29%3B%0D%0Aiframe.id%20%3D%20%27tree_grid_viewer%27%3B%0D%0Aiframe.width%20%3D%20%2750%25%27%3B%0D%0Aiframe.height%20%3D%20%2750%25%27%3B%0D%0Aiframe.position%20%3D%20%27absolute%27%3B%0D%0Aiframe.top%20%3D%20%27190px%27%3B%0D%0Aiframe.left%20%3D%20%27167px%27%3B%0D%0Aiframe.frameBorder%20%3D%20%270%27%3B%0D%0Aiframe.scrolling%20%3D%20%27auto%27%3B%0D%0Aiframe.src%20%3D%20tgvUrl%3B%0D%0Adocument.body.insertBefore%28iframe%2C%20document.body.childNodes%5B0%5D%29%3B]
"the method is blankly dumping the TGV into the form, not into the HTML container designated."
Yeeees...cause this is what your code does right now. It creates a NEW iframe and dumps the TGV straight into the form with document.body.insertBefore.
Why not do something like this:
var iframe = document.getElementById("bplTgvFrame");
...
iframe.src = tgvUrl;
I should start to write consulting invoices....![emoticon:44a8a53ad3364ea78a16c5a3229f75bb]
Unfortunately we lost user Alaxala in this threat due to the spam filter. Alaxala showed me another useful approach, but weren´t able to test it yet.