Hi Dave. Thanks for the interest. Actually this line was the issue: <td><form><button type="submit" name="delete" value="{{=item.id}} "style="background-color: #DA2128;
instead of <td><form><button type="submit" name="delete" value="{{=item.id}}" style="background-color: #DA2128; Note the difference at the *style=* On Thu, Dec 6, 2018 at 11:42 AM Dave S <snidely....@gmail.com> wrote: > > > On Wednesday, December 5, 2018 at 6:16:15 AM UTC-8, Maurice Waka wrote: >> >> I'm trying to delete a certain row among others with this code: >> [...] >> > want to delete a specific selected row >> >> [image: lunch.png] >> row = db(db.diary.id==request.vars.delete).delete()# deletes all >> except under 'lunch' >> >> > > When you say "deletes all except under 'lunch'", does that mean that the > delete button works if you're displaying [and punching delete for] Dinner > entry, but for a Lunch entry, it gives the error below? > > >> [...] >> > When I want to delete any row under 'LUNCH', I get this error: >> >> ValueError: Invalid objectid argument string. Requires an integer or base 16 >> value >> >> > What does your view look like? Are you using javascript to do the > buttons? JQuery? > > Also, note that request.vars are usually strings and you may need to do a > string to int conversion (atoi() for C users, but int() for Python). > (for dates, datetime.datetime.strptime() might be needed.) > > /dps > > > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/CktRiwZp5ow/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.