New row added to model through adoptRows not showing fields in the table

edited December 29, 2016 in Questions
I am adding a row in a model with the help of adaptRows function. The table which is listing all the rows in the model is showing a new blank row, but no field values. Through alerts in Javascript I can see the field values are getting populated.

Any pointers would be of great help. 
Thanks!!

-Sayali

Comments

  • edited January 21, 2016
    I am having this same issue. I have a JSON array with the keys named the same as the field ids on the model and when I do JS model.adoptRows it works and the Model gets all the rows and the values are in the rows successfully.

    BUT, the Table that displays non-UI only fields does not render the values, UI Only fields render fine and the values are there. 

    Ex. I have a JSON with 2 keys like below. Both values get placed into the model and are retrievable but when displayed in table component Account__c is blank but uiOnlyField is not.
    {"Account__c": "001xxxxxxxxxxx","uiOnlyField": "Value Here"}

  • Rob HatchRob Hatch 💎💎💎
    edited September 1, 2016
    I'm not completely sure here,  but I'm guessing you need to refresh the table component after adopting rows. 
  • edited January 22, 2016
    I was trying to figure out how to do that but couldn't seem to find the right syntax. Do you have an example of that in javascript?
  • edited February 5, 2016
    To refresh the table that it should ask it's model for data:
    skuid.component.getById('<tableUniqueID>').render(); 
    It will re-render the table but won't request any new data.
  • edited December 29, 2016
    I'm having a similar issue, but wanted to check here before starting another post.  Using adoptRows brings data into the model.  However, I'm creating the skuidTable component dynamically using the code below.  As you can see in the attached screenshot, the table recognizes the rows, but doesn't show any data.  In the component code, I've added the field I expect to be displayed.

    image
            var xmlDefinition = $xml(             '<skootable showconditions="false" showsavecancel="false" searchmethod="client" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="false" model="PriceList" mode="read"/>'        ).append(             $xml('<fields/>').append(                 $xml('<field id="Product" allowordering="true"/>')             ),             $xml('<views><view type="standard"/></views>')         );         element.empty();         var comp = skuid.component.factory({             element: element,             xmlDefinition: xmlDefinition         });          comp.rerender(); //comp.render();
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!