Forum Post: RE: EVAL block with variable inside?

  • Thread starter Thread starter Gian Torralba
  • Start date Start date
Status
Not open for further replies.
G

Gian Torralba

Guest
Hello, Please follow the steps provided below: - Object A is the original object that holds the records. - Object B is the new object that will hold the counter for the charts. 1. Create the object B that will be used to hold the integer count of records. 2. Create an integer field in object B this will hold the updated count value of records. 3. Create a string field in object B this will hold the picklist code. 4. Create a trigger in object A (after create, after update, after delete). This will update the record in object B if - The record with a picklist value already exists - If there is no record with the same picklist code found in object B, create a record with the picklist code from object A. 5. Every time object A's record is update, created or deleted, the trigger will fire and update records listed in object B. 6. Create a script component in the page you need to display the chart. script $(document).ready(function(){ rbf_selectQuery("SELECT name, count FROM object_b", 1000, function(data){ if(data.length 0){ for(var i=0; i data.length; i++){ /*this will loop each record in object_b and you can integrate it with your chart script*/ } } }); }); /script Hope this helps a bit. Thank you, Gian

Continue reading...
 
Status
Not open for further replies.
Back
Top