Hi,
I was trying to deactivate some conditions and keep 1 live condition active and bring some data based on that,but the below code doen’t query the new data rows as I expected.
I still can see in the console, the query is modified as I expected though the getFirstRow() returns nothing
Please help, Thanks in advance.
var EventRelationModel = skuid.model.getModel('EventRelation');<br />var EventRelationsData = EventRelationModel.getFirstRow(); <br />var WhoModel = skuid.model.getModel('Who');<br />var WhoData = WhoModel.getFirstRow();<br />if((!WhoData) && (existingEvent.WhatId === null || existingEvent.WhatId === 'undefined' || existingEvent.WhatId === '')) {<br /> <br /> $.each(WhoModel.conditions,function(i,condition){<br /> <br /> if (condition.name && condition.name !== 'whoFilter4'){ <br /> WhoModel.deactivateCondition(condition,false);<br /> }<br /> });<br /> <br /> var whoFilter4 = WhoModel.getConditionByName('whoFilter4',false);<br /> WhoModel.setCondition(whoFilter4, EventRelationsData.RelationId);<br /> WhoModel.updateData();<br /> <br /> WhoData = WhoModel.getFirstRow();<br /> <br /> // THIS PRINTS UNDEFINED<br /> console.log('TEST DATA ------ ');<br /> console.log(JSON.stringify(WhoData));<br /> console.log('TEST ------ ');<br /> EventModel.updateRow(<br /> existingEvent,{ WhatId : WhoData.AccountId}<br /> );<br />} <img src="//cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/skuid/original/2X/a/a90f6c62aa8b8d9561841ee2c61f7a31fdd0ce9b.png" />