Title: Shortcode &#8211; Recent Value
Last modified: January 27, 2025

---

# Shortcode – Recent Value

 *  Resolved [Wordpress Bob](https://wordpress.org/support/users/stewartmartin/)
 * (@stewartmartin)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/shortcode-recent-value/)
 * Hi, I have been playing with the free version of wpdatatables and looking at 
   displaying cell data on a front end web page.
 * My particular case is for an animal hospital. When they open up an animal record,
   I want the shortcode to show the last reading of certain data, for example: weight.
 * I can use the shortcode to target a specific cell value and that works fine, 
   but it’s not very useful in my case as it will only ever read the row ID that
   the shortcode is referring to. – I would have thought this was an easy thing 
   to accomplish, as I want the code to just read the most recent cell value instead
   of targeting something specific, but for the life of me I can’t see to see how
   I can get this to work, can it? it sounds simple?
 * Thanks a lot for reading!

Viewing 1 replies (of 1 total)

 *  Plugin Support [Milos Jovanovic](https://wordpress.org/support/users/milosjovanovicwpdt/)
 * (@milosjovanovicwpdt)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/shortcode-recent-value/#post-18297636)
 * Hello,
   My sincere apologies for writing so late to this post. We had some issues
   with our Support system, but it has been fixed now, so going forward we should
   get back to our regular response times.I am sorry to disappoint you, but we don’t
   currently have a built-in solution for the use case you described, such as a ‘
   dynamic row identifier’ for the Single cell shortcode, in a way so it looks up
   which is the most recently added row, rather than looking always for a specific
   row index number or unique row ID.
 * Please feel free to search on our suggestions page ([https://features.wpdatatables.com/](https://features.wpdatatables.com/)),
 * to see if someone may be already suggested this feature. If you can’t see it,
   feel free to add your suggestion there, and as more people vote, the feature 
   will move higher on the priority list.
 * You can certainly follow our changeLog if you’d like([https://wordpress.org/plugins/wpdatatables/#developers](https://wordpress.org/plugins/wpdatatables/#developers)),
   where we state any changes/new features/bug fixes during updates;
 * and our newsletter([https://wpdatatables.com/newsletter/](https://wpdatatables.com/newsletter/)),
   so you’re informed about new features, bug fixes, freebies, etc.
   2. There could
   be a possible workaround idea you can try, it depends on what kind of table you
   use and if you use sorting, etc.For example, as mentioned in the [Documentation](https://wpdatatables.com/documentation/table-features/single-cell-shortcode),
   if you use the first shortcode way, for the row ID :`[wpdatatable_cell table_id
   ="1" row_id="1" column_key="column_name" sort="1"]`
 * **row_id** – is the ID of the DataTable table row (different for each type):
    - for **non-server-side tables** created from an external source (Excel, CSV,
      XML, Google Sheet, or PHP Array) the value from the **row index** will be 
      used.
 * In our free Plugin version, you don’t have SQL-based tables, so they are all ‘
   non-server-side’ type.
   In this case, if you edit on the file source, such as 
   a Spreadsheet, let’s say you have a Google Sheet which is edited by a certain
   Team.If you create the sorting on that source Google Sheet in a way that it always
   sorts to show the latest entry/row (for example, have a Date column and have 
   it sorted by descending order, so the latest date and/or time is sorting the 
   Sheet);Now, in our table, you can disable our sorting option in table settings–
   This way, the 0 index row will always be the first row, so if you edit the source
   Sheet, our table will just follow the sorting in the way the values have been
   entered and sorted by the source Sheet itself.So, you can use the 0 for the row
   ID, something like this :[wpdatatable_cell table_id=”1″ row_id=”0″ column_key
   =”column_name”]Of course, just change the table ID to your actual table ID and
   the column key to the correct one.That way – if you do the sorting on the source
   Sheet and disable our Plugin sorting, you can just use the row index number, 
   and zero will always show the first row from the Sheet.I hope that helps.

Viewing 1 replies (of 1 total)

The topic ‘Shortcode – Recent Value’ is closed to new replies.

 * ![](https://ps.w.org/wpdatatables/assets/icon-128x128.gif?rev=3010404)
 * [wpDataTables - WordPress Data Table, Dynamic Tables & Table Charts Plugin](https://wordpress.org/plugins/wpdatatables/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpdatatables/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpdatatables/)
 * [Active Topics](https://wordpress.org/support/plugin/wpdatatables/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpdatatables/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpdatatables/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Milos Jovanovic](https://wordpress.org/support/users/milosjovanovicwpdt/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/shortcode-recent-value/#post-18297636)
 * Status: resolved