Jump to content

Carl Booth

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Carl Booth

  1. Hi Jan Thanks for the welcome. $award->timetable is an artefact of me copy and pasting wrong, it should be $opday->timetable, which is a Page reference field in the table. $tt is a Page, the comment at the end that explains how I've assigned it ($pages->findOne). However I'm having the same problem if the field is a plain text. Your example (from the README) works correctly for me (it's essentially the first block in my code) however that's only the first() or last()) item - I'm needing to edit a specific filtered row (or set of rows) - those with a specific field value. I think this is what I'm struggling with - capturing those rows and editing them in a way the module will write back to the database table. Cheers
  2. Hi I can anyone help me with manipulating ProFields Table rows? It works ok using first() and last() as per the README, however I can't seem to manipulate specific items, given a selector. I presume I'm doing something wrong when selecting the row(s). $tt = $pages->findOne("template=repeater_basetimetables,title=Silver") // Works - from README $page->of(false); $opday = $page->operatingcalendar_days->last(); $opday->timetable = $tt; $page->save('operatingcalendar_days'); // Doesn't work - set to TableRows is not an allowed type $page->of(false); $opday = $page->operatingcalendar_days("ttdate=2022-08-11"); $opday->timetable = $tt; $page->save('operatingcalendar_days'); // Doesn't work - no error $page->of(false); $opday = $page->operatingcalendar_days("ttdate=2022-08-11")->first(); $opday->timetable = $tt; $page->save('operatingcalendar_days'); Or, do I have to remove and re-create rows I want to modify? Cheers
×
×
  • Create New...