Skip to main content
Nintex Community Menu Bar
Question

Duplicate Rows Added to Table

  • July 9, 2024
  • 7 replies
  • 23 views

Forum|alt.badge.img+8

I have a table in which the user can add the names of attachments from another object.  These attachment names are added to a separate object that which contains the ID of the parent record as a relationship key.

40b04204ad034bba95ac6e2deb8e41efa906a784.jpg

In the example above, the user has added “Sample Attachment #10” to the current record.  The user can add an undefined number of attachments to each record.  I have this setup so that the attachments model opens a popup when a new record is attached to the parent record.  

f0750038003db662e2a0853cba27fa0ce5e7f96e.jpg

In the popup shown above, the user clicks on the paper clip icon which triggers a multiple action event.  The table listed above is connected to a model in which all of the original attachments are initially added to the database.

Just so I’m clear, model_attachments is the model in which the files are added to the database, model_parent contains the records to which the attachments will be linked, and model_attach_list is the model connected to each record in model_parent that allows the user to add an undefined number of attachments.  Clear as mud?

My problem is this:  When the user clicks the icon to “link” an attachment to a record, ALL of the attachments in the model_attachments are changed to to the current attachment.

3d954ea5cde3e18c591bb87d8a2fdd2173a52198.jpg

You can see above that “Attachment #10” now shows as “Attachment #14” when the user tried to add “Attachment #14” to the table.

When the icon is clicked, the actions are:
1. Update a field on a Row  >>>  model_attach_list   >>>  Attachment Name  >>>  {{AttachTitle__c}}
2. Update a field on a Row  >>>  model_attach_list   >>>  Attachment ID  >>>  {{AttachID__c}}

In these 2 actions, {{AttachTitle__c}} and {{AttachID__c}} are fields in the popup table from model_attachments.

WHAT THE HECK IS CAUSING THIS?!?!?!  Please help…

7 replies

Forum|alt.badge.img+17
  • Nintex Employee
  • July 9, 2024

Scott you’ve got me spinning there. 

It looks though like you are on a row of model 1 and are asking to update row(s) of model 2 when you click the icon.  In this case Skuid doesn’t know which row to update and so it updates them all.   So Skuid is working here as it was designed. 

I think the answer to your challenge will be found in the data model.  You can use the action framework to add a row to identifiy the new attachment,  and add a default value to connect that new row with a parent, etc.  But it has to be done within a correct data model. 

I may also be completely blind to your genius here.  That is totally possible. 


Forum|alt.badge.img+8
  • Author
  • July 9, 2024

I’m still working on this issue and it’s starting to make my hair fall out… let me ask this, why does the Action Type read “Update a Field on Row(s)”?  Is it possible that i’m inadvertently updating mulitple rows? 


Forum|alt.badge.img+8
  • Author
  • July 9, 2024

Anyone have any thoughts on this?


Forum|alt.badge.img+8

Hi Scott,

Maybe I’m not understanding this correctly, but when you click on the paper clip, wouldn’t you want to create a new row in your “Attachment Links” table, not update existing rows?  That would be a different action type in the action framework.


Forum|alt.badge.img+8
  • Author
  • July 9, 2024

I’ll try this.  But let me now ask:  how do I capture field data from a table row when I click the paperclip?


Forum|alt.badge.img+7

Scott,
You should just be able to use merge syntax (e.g. {{Name}} or {{Description}}). Since it’s a row action, Skuid should use the field value from the row in context. Does that answer your question?
Emily


Forum|alt.badge.img+8
  • Author
  • July 9, 2024

right you are - thanks Emily!