Skip to main content
Nintex Community Menu Bar
Question

Update UI only field in Aggregated Table ?

  • July 11, 2024
  • 3 replies
  • 1 view
  • Translate

Forum|alt.badge.img+4

I have a Aggregated model and UI only field in that aggregated model. I am trying to update the UI field on page load but it doesn’t get updated ?
Below is the sample code:
$.each( modelUI.getRows(), function(){
rowsToUpdate[this.quoterSBQQAccountrId] = { TotalAllocatedField: 22};
});
Since, this is aggregate table i am using Aliasname for [this.Id]
In console, i can see the the field is updated in Console but it doesn’t get reflected on the table ?

CONSOLE

TABLE

Did this topic help you find an answer to your question?
This topic has been closed for comments

3 replies

Forum|alt.badge.img+10

You could go declarative with this:

On page load you can set the UI Only Field value to be whatever you want. It’s slick, simple, and supported when you go to upgrade in the future.

No code required

Any reason why you’re wanting to use code? Any particular use case here?

Translate

Forum|alt.badge.img+4
  • Author
  • 20 replies
  • July 11, 2024

Actually, i am fetching the value from Salesforce(Apex) in JSON format. I need to populate these value in the UI field in aggregated model. I can see these value in console but doesn’t get updated  in model ?
Below is the part of the code, 

var result = sforce.apex.execute(‘TotalAllocatedBadges’,‘TotalAllocatedBadges’, {acctL:JSONString,eventId:eID});
console.log(result);
var acctList = JSON.parse(result);
console.log(acctList);
var rowsToUpdate = {};
var modelEB = skuid.model.getModel(‘ExpocadBadgeAgg’);
if (acctList)
{
   $.each(acctList, function( index,value) {
       rowsToUpdate[value.acctId] ={TotalAllocatedField: value.totalAllocatedBadges};
   });
   modelEB.updateRows( rowsToUpdate );   
}    



Translate

Forum|alt.badge.img+10

In that case I would switch the Content to “Field from another model” and bring in the information you’re looking for in a regular model. If you’ve already got the code for a regular model to bring in the Salesforce Apex in JSON format to a regular model.

Translate

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings