Inserting url into iframe

I am not very proficient with JavaScript. I do my best to make educated guesses, haha. I have a question. I wrote a SharePoint List Form code, asking Plumsail to insert the SharePoint ID as a param with a PowerApps link into an iframe. It's a 60-40, and it doesn't always load the script correctly. Is there a way for me to improve the loading efficiency of the code; insert the link into the iframe so that it always captures the ID or waits until the ID loads before it inserts the link?

fd.spRendered(function () {
 function setiFrameURL() {
        $("iframe").attr("src", "" + fd.field("ID").value);

    function hidebox() {
        if (fd.field("OrientationLocation").value == "CDL Program") {
            fd.toolbar.hidden = true;
        } else {
            fd.toolbar.hidden = false;

            function naruto() {
                if (fd.field("TravelToTruck").value) {
                    fd.field("TruckLocation").required = true;
                } else {
                    fd.field("TruckLocation").required = false;

            fd.field("TravelToTruck").$on("change", naruto);


                .then(function (field) {
                    if (field.value) {
                        field.disabled = true;

                    fd.toolbar.buttons[1].click = function () {
                        if (confirm("Closing Without Saving?")) {


Dear @IT.Joe,
If you just need current Item ID, you don't need the ID field, you can just use:


That does speed it up a lot. Thank you :slight_smile: