Skip to main content
Nintex Community Menu Bar
Question

Create records in a table based on selected records in another table.

  • July 9, 2024
  • 34 replies
  • 140 views

Show first post
This topic has been closed for replies.

34 replies

Forum|alt.badge.img+9

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


Forum|alt.badge.img+8

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.


Forum|alt.badge.img+8

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([ParentModel,aircraftdata,addingQuotes,]);
skuid.model.updateData([ParentModel,addingQuotes,aircraftdata]);
//skuid.model.updateData([addingQuotes,aircraftdata,]);
//skuid.model.updateData([aircraftdata,addingQuotes]);
//skuid.model.updateData([skuid.model.getModel(‘BrokerQuote’),aircraftdata]);
//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?


Forum|alt.badge.img+8

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


Forum|alt.badge.img+8

Done. Thanks Bena.


Forum|alt.badge.img+8

*Ben !


Forum|alt.badge.img+8

hah, I can go by Bena too. 🙂


Forum|alt.badge.img+8

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.


Forum|alt.badge.img+8

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.