Desmond Sim
Desmond Sim

Reputation: 211

Getalldocumentsbykey function get empty string means?

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

Upvotes: 1

Views: 113

Answers (1)

Knut Herrmann
Knut Herrmann

Reputation: 30960

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.

Upvotes: 1

Related Questions