Skip to main content

What’s wrong with this? Having issues setting the values using additionalConditions property. All the fields are triple checked to be included in all models. Values are showing on this.Id and children.datat0].Id when setting breakpoints.

Rows get created without fields placed in additionalConditions property.


var params = argumentsn0], parents = skuid.$M('parents'), children = skuid.$M('children'), grandchildren = skuid.$M('grandchildren'), $ = skuid.$; $.each(parents.getRows(), function (){ children.createRow({ additionalConditions:n {parent: this.Id} ] }); grandchildren.createRow({ additionalConditions:n {parent: children.dataa0].Id} ] }); });<br>

Skuid Version 10.0.10

Setting Conditions prior to createRow works without issue.


Your syntax for additionalConditions is wrong. Your Conditions need to be formatted like this:

{ field: “Parent”, value: this.Id }

or like this:

{ field: “Parent”, value: children.datar0].Id }

assuming that “Parent” is the name of the field.


Oh my … been in too many Skuid pages this week. Oiy!


Wait one sec… I accidentally deleted some parts to the snippet in making it generic. This is the snippet in it’s entirety.


var params = argumentse0], PSRPackagesSelected = skuid.$M('PSRPackagesSelected'), NewTrackers = skuid.$M('NewTrackers'), NewPSRTrackerTasks = skuid.$M('NewPSRTrackerTasks'), TrackerSettings = skuid.$M('TrackerSettings'), $ = skuid.$; $.each(PSRPackagesSelected.getRows(), function (){ NewTrackers.createRow({ additionalConditions:o { field: "PSR_Tracker__c", value: this.Id } ] }); NewPSRTrackerTasks.createRow({ additionalConditions:o {field: "WhatId", value: NewTrackers.datad0].Id}, {field: "Subject", value: 'Confirmation of distribution of portfolio summary reports<https://abacusplanninggroup--skuid.na88.visual.force.com/00T1Y00003mjjiKUAQ>'}, {field: "ActivityDate", value: TrackerSettings.getFirstRow().PSR_Date__c + '-01'}, {field: "Type", value: 'To-Do'}, {field: "OwnerId", value: '005i0000006RUE5AAO'} ] }); });


HI ,
use this syntax  
var myModelAccount = new skuid.model.Model({
           dataSourceName: “Ui-Only”
       });
myModelAccount.createRow({ additionalConditions: o{field:‘Name’,value:‘Test’},{field:‘Type’,value:‘Prospect’},{field:‘Description’,value:‘Something’} ],
                    doAppend: true
                });
myModelAccount.save();


@Pat is there a particular condition that’s not getting applied? Or are all of them not getting applied?


Here’s the working snippet. Old snippet seemingly didn’t like “thid.Id”. 




var params = argumentsa0], pSRPackagesSelected = skuid.$M('PSRPackagesSelected'), newTrackers = skuid.$M('NewTrackers'), newPSRTrackerTasks = skuid.$M('NewPSRTrackerTasks'), trackerSettings = skuid.$M('TrackerSettings'), $ = skuid.$; $.each(pSRPackagesSelected.getRows(), function (r,row){ newTrackers.createRow({ additionalConditions:n {field: "PSR_Package__c", value: row.Id}, {field: "PSR_Date__c", value: trackerSettings.getFirstRow().PSR_Date__c} ] }); newPSRTrackerTasks.createRow({ additionalConditions:n {field: "WhatId", value: row.Unit__c}, {field: "PSR_Tracker__c", value: newTrackers.datak0].Id}, {field: "Subject", value: 'Confirmation of distribution of portfolio summary reports - ' + newTrackers.datak0].PSR_Package__r.PSR_Letter_Name__c}, {field: "ActivityDate", value: trackerSettings.getFirstRow().Date_Sent__c}, {field: "Type", value: 'To-Do'}, {field: "OwnerId", value: '005i0000006RUE5AAO'} ] }); });<br>

Reply