1
Set timeVc=timeVw.Allentries
    Set tobeDeleted=timeVw.Getalldocumentsbykey("", true)
    Call tobeDeleted.removeall(True)

Just now want to confirm what is the meaning of getalldocumentbykey with empty string

Desmond Sim
  • 211
  • 2
  • 19

1 Answers1

1

GetAllDocumentsByKey with an empty string as first parameter returns an empty collection.

If you want to get all documents with an empty value in view's first sorted column then change the formula of your first sorted column to

@If(YourFieldName = ""; " "; YourFieldName)

It has a space instead of an empty string now.

Set tobeDeleted=timeVw.Getalldocumentsbykey(" ", true)

returns all those documents then.

Knut Herrmann
  • 30,880
  • 4
  • 31
  • 67
  • ok get it. i check previous ppl coding, put a space " ", thought what happend. normally i will put a Keystring to search for an item. Thanks ~ – Desmond Sim May 23 '17 at 05:57