Create new rows in a table added on a pop-up

  • 1
  • Question
  • Updated 3 years ago
  • Answered
I have added a table in a pop-up.I am not able to add new rows to the table by clicking on'+' icon.Is this a limitation?
Photo of Anjali Kumar

Anjali Kumar

  • 310 Points 250 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
You don't see the plus sign or nothing happens when you press it?
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Anjali:  I suspect you have a context condition on the table, which is not getting applied when you create the new row.   Here is how you can test this. 

1. In the browser console show the contents of the model driving your table.  Use this syntax:   skuid.$M('ModelName').data    This will show you all the entries in the model. 

2. Push the button in the table.  Look again at the model data and see if a new row has been created.  (push the up arrow to reload the console statement)  If a row has been created, you can look in its data to see all the values - and see whether the context condition would have correctly caught it. 


You may have to create a custom "add row" button that uses the action framework to add a row to the model and pre-populate that row with the value that makes the row show up in that particular popup table. 
Photo of Sri

Sri

  • 266 Points 250 badge 2x thumb
Let me add to Anjali's post.

We have a Table that displays all the Order Line item. when the user clicks row action we are showing a Popup, this Popup has a table.

It always shows "No to Display
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Then the context conditions stuff that I refer to above is even more critical. 
Photo of Sri

Sri

  • 266 Points 250 badge 2x thumb
Thanks Buddy, working just fine :)
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Sweet!