שתף באמצעות


isLoaded (Client API reference)

מחזירה אם איגוד הנתונים עבור הפקדים המרכיבים בפקד תצוגה מהירה הושלם.

תחביר

quickViewControl.isLoaded();

ערך החזרה

סוג: בוליאני.

תיאור: true הוא איגוד הנתונים עבור פקד מרכיב הושלם; false אם לא.

הערות

ייתכן שאיגוד הנתונים עבור הפקדים המרכיבים בפקד תצוגה מהירה לא יושלם במהלך האירוע OnLoad של הטופס הראשי מאחר שייתכן ש טופס התצוגה המהירה שהפקד מאוגד לו אינו טעון. כתוצאה מכך, ייתכן ששימוש ב- getAttribute או בשיטות הקשורות לנתונים בפקד מרכיב לא יפעל. פעולת השירות isLoaded עבור פקד התצוגה המהירה מסייעת לקבוע את מצב איגוד הנתונים עבור פקדי מרכיבים בפקד תצוגה מהירה.

דוגמה

הקוד לדוגמה הבא מדגים כיצד ניתן להשתמש בפעולת השירות isLoaded כדי לבדוק את מצב האיגוד, ולאחר מכן לאחזר את ערך העמודה שפקד הבוחר בפקד תצוגה מהירה מאוגד לה.

function getAttributeValue(executionContext) {
    var formContext = executionContext.getFormContext();
    var quickViewControl = formContext.ui.quickForms.get("<QuickViewControlName>");
    if (quickViewControl != undefined) {
        if (quickViewControl.isLoaded()) {
            // Access the value of the column bound to the constituent control
            var myValue = quickViewControl.getControl(0).getAttribute().getValue();
            console.log(myValue);
            
            // Search by a specific column present in the control
            var myValue2 =  quickViewControl.getControl().find(control => control.getName() == "<AttributeSchemaName>").getAttribute().getValue();
            console.log(myValue2);
            
            return;
        }
    }
    else {
        console.log("No data to display in the quick view control.");
        return;
    }
}

formContext.ui.quickForms