Title: Table Cell Format
Last modified: August 19, 2023

---

# Table Cell Format

 *  Resolved [grokwhy](https://wordpress.org/support/users/grokwhy/)
 * (@grokwhy)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/table-cell-format/)
 * I’m trying to get cell formating working using the Advanced Setting on the table
   builder,
 * { “render”: “function(row, data, index) {return data === 1 ? ‘Yes’ : ‘No’;}” }
   
   The editor accepts the code, but no change on the front end.Any thoughts here?
   No errors appear in Chrome Dev Tools.Thanks,GrokWhy

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Leeberty](https://wordpress.org/support/users/aaronvincentlee/)
 * (@aaronvincentlee)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/table-cell-format/#post-16990820)
 * Hi [@grokwhy](https://wordpress.org/support/users/grokwhy/) ,
 * I understand that your code isn’t working as intended. Let me help you with this.
 * Can you please explain the behavior you want to achieve with your code? Perhaps
   an example page or basis for us to assess this better.
 * We’ll wait for your reply.
 *  Thread Starter [grokwhy](https://wordpress.org/support/users/grokwhy/)
 * (@grokwhy)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/table-cell-format/#post-16991877)
 * [@aaronvincentlee](https://wordpress.org/support/users/aaronvincentlee/) Thanks
   for getting back to me. Here’s a simple example. I’ve used Table Builder to create
   a table of toys. When the data is displayed in the grid, I’d like InStock to 
   be displayed as Yes/No, and Cost to be displayed with a $.
   What do I add to Advanced
   Settings?
 * Thanks!
   GrokWhy
 * ![](https://i0.wp.com/j6.grokwhy.com/wp-content/uploads/2023/08/Toys_sample.png)
 *  [Leeberty](https://wordpress.org/support/users/aaronvincentlee/)
 * (@aaronvincentlee)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/table-cell-format/#post-16996915)
 * Hi [@grokwhy](https://wordpress.org/support/users/grokwhy/) ,
 * You are most welcome!
 * I’ve recreated your table and came up with a solution for you.
 * Please try this code in the **advanced settings**:
 *     ```wp-block-code
       { 
       "fnRowCallback": "function(row, data, index) { if (data[2]=='1') { jQuery(row).find('td:eq(2)').html('Yes'); } else { jQuery(row).find('td:eq(2)').html('No')} }" 
       }
       ```
   
 * For reference, see: [More Complex JavaScript Functions | WP Data Access](https://wpdataaccess.com/docs/data-tables-advanced-features/advanced-settings/#javascript-functions-more-complex)
 * Your project should look something similar to this after. See video: [https://share.getcloudapp.com/geuP9yO0](https://share.getcloudapp.com/geuP9yO0)
 * I hope this helps.
 * Let me know how it goes for you.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Table Cell Format’ is closed to new replies.

 * ![](https://ps.w.org/wp-data-access/assets/icon-256x256.png?rev=3299063)
 * [WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards](https://wordpress.org/plugins/wp-data-access/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-data-access/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-data-access/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-data-access/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-data-access/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Leeberty](https://wordpress.org/support/users/aaronvincentlee/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/table-cell-format/#post-16996915)
 * Status: resolved