Jump to content

Not able to remove all tag for existing note. while updating it.

Recommended Posts

Hi ,

I was trying code in python for updating note. 

note_obj = note_store.getNote(token, reqpara_note["ntdtanoteguid"], True, False, False, False)

I came across i was not able to remove all tag from note.

if taglist is not None:    note_obj.tagNames = taglist # here it will have list ['newtag','todo']else:    note_obj.tagNames = None

I tried to remove this tag in my code way , just updated the tagGuids to None

note_obj.tagGuids = Nonereturnnote = note_store.updateNote(token, note_obj)

I was able to updated the tags (add or remove) for a Note

yeha! tag is not deleted from account. I don't need to delete. It should just remove from the note i want to update .


When I try to remove the last tag (i.e there is only one tag to the Note) It not get removed returnnote   do have that last tag  with him .
I don't know why?
u can also try to add many tags to note and then remove all tag at once the returnnote will return list of tag again.

Any body have solution? or Why ?

Link to comment
  • Level 5*

A couple of things...


First, this isn't the best forum to post coding topics - use the "Evernote for Developers" forum.


In terms of tags on a note - as I think you've discovered, the TagGuids property is the official field that holds the tags assigned to a note.  That's what you use to manipulate a note's tags.   TagNames is just a shortcut to be able to add tags to a new note by name; they are only used when creating a note - this property is not populated for an existing note.


This is explained in the documentation for the Note object:


tagGuids A list of the GUID identifiers for tags that are applied to this note. This may be provided in a call to createNote() to unambiguously declare the tags that should be assigned to the new note. Alternately, clients may pass the names of desired tags via the 'tagNames' field during note creation. If the list of tags are omitted on a call to createNote(), then the server will assume that no changes have been made to the resources. Maximum: EDAM_NOTE_TAGS_MAX tags per note   tagNames May be provided by clients during calls to createNote() as an alternative to providing the tagGuids of existing tags. If any tagNames are provided during createNote(), these will be found, or created if they don't already exist. Created tags will have no parent (they will be at the top level of the tag panel).
Link to comment


This topic is now archived and is closed to further replies.

  • Create New...