BPM, Workflow, and Case

BPM, Workflow, and Case

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  coach view has no context after item removing

    Posted Fri September 16, 2022 05:40 AM
    Edited by Vladislav Tishchenko Fri September 16, 2022 05:48 AM
    Good day, 

    i would like to know how is that when i'm

    removing one item from the view - it only removes context from the view i'm defining (page.ui.get(etc..))

    remove: function (index) {
    
            var tableData = this.table.getData();
            var arr = tableData.items.slice();
            arr.splice(index, 1);
            this.table.clear();
            this.table.appendElements(arr);
        }​





    ------------------------------
    Vladislav Tishchenko
    ------------------------------


  • 2.  RE: coach view has no context after item removing

    Posted Fri September 16, 2022 10:16 AM
    Hi Vladislav,

    The requirement is not very clear, please could you elaborate the requirement ?

    Thanks!



    ------------------------------
    Atanu Roy
    Solution Architect
    Salient Process
    ------------------------------



  • 3.  RE: coach view has no context after item removing

    Posted Fri September 23, 2022 08:10 AM

    Hello Vladislav

    ive had a similar issue. while not equals to yours, it might help.

    if you wanna delete a record from a table you could use

    var reg=${table}.getSelectedIndices(true);//you get the selected items from the list
    for (var i=reg.length-1; i>=0; i--) {
    ${table}.removeRecord(reg[i],false);//you remove the selected record. always go through the list backwards in this case to avoid index issues
    

    if you want to append elements to the list, try to do it recursively passing ALL the properties the object has (not just the columns that are in the table)

    this.ui.get("table1").appendElement({attribute1:object.attribute1
    ,attribute2:object.attribute2
    ,attribute3:object.attribute3
    ,attribute4:object.attribute4
    ,attribute5:object.attribute5
    ,attribute6:object.attribute6
    	});


    ------------------------------
    Hernan Gaona
    ------------------------------