Skip to main content

I haven’t quite seen this in the discussions, so I apologize it there is an existing thread. My problem is this. I have an object (Object A) that contains hundreds of thousands of records in it. Object A acts as a lookup object only and is not associated with accounts, opportunities, cases, or anything like that. I have another object (Object 😎 that that references Object A through a lookup. Object B is associated with Accounts, cases…all that jazz. The purpose of this structure is for easy record creation for Object B. When someone calls in, we find their information in Object A and create a record in Object B that will tie the account we are creating. I would like to search for a record in Object A table and add a mass action to create a record in Object B with the lookup already populated (lookup that references Object A). How do I go about doing this with a javascript inline snippet?

I’ve actually had problems before with update Data on a model condition that uses the in operator. I think this might be a bug, here is a thread with a similar situation I had.

https://community.skuid.com/t/in-operator-bug-in-model-condition


Hi Greg, Try one quick thing.  Do what Moshe said about combining the two models into one updateData call, but switch the order of the models.

skuid.model.updateData((addingQuotes,aircraftdata]);

I’m not 100% sure this will fix your issue, but it’s worth a try.  Order is important in updateData calls, just as it is important when you’re building out your models in the page composer.  You need the source model to be before the dependent model in the list.


Thanks Ben & Moshe, I’ve tried both of those (switching order + updating the parent model) but still nothing 😦

the current updateData(); statement I have looks like this:

addingQuotes.save({callback:function(result){
if(result.totalsuccess){
//skuid.model.updateData(skuid.model.updateData(DParentModel,addingQuotes,aircraftdata]);
//skuid.model.updateData(//skuid.model.updateData(//skuid.model.updateData(//aircraftdata.updateData();
    console.log(‘updated aircraft list’);
} else { console.log(‘not working’) }
}});


Could this creation of rows in another model be done if the ‘aircraftdata’ list of records was done as a page include component rather than another model on the existing page?


Greg, Would you mind if I took a look in your org to confirm if this is a bug, or something else is going on?  Can you grant Skuidify LLC access to your org and let us know the org Id and page name?  You can email the details to support@skuidify.com


Done. Thanks Bena.


*Ben !


hah, I can go by Bena too. 🙂


I took a look at your org.  I was able to fix the issue by changing the condition on your “database” model from a “Field from another model” condition to a “Result of SubQuery” condition.  

Check out the “CharterOpTEST_Support_Clone” page I made in your org.

I think there’s still a bug with “field from another model” type conditions that are requeried after the initial page load.  I’ll try to replicate that issue in our dev org and see if we can get that fixed.


Ben thats fantastic. Thank you very much. I’m still getting my head around the SubQuery condition on models and wouldn’t have thought of that. It would be good to see some more tutorials on this condition as I don’t recall seeing many in my travels.

Thanks also to Moshe. You guys are awesome.