Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetQmItemsInFolder, also fetches outside specified folder
#3
Sorry I gave wrong example, this is the correct one I am trying to use but it gives me 'expected string' error

Macro Macro11
Code:
Copy      Help
QMITEM q
str p="\test1"
_i=qmitem(p 0 &q 1|8)
ARRAY(QMITEMIDLEVEL) a; int i
if(!GetQmItemsInFolder(_i &a)) end "failed" ;; <============ 'Expected string...'
for i 0 a.len
,_i=a[i].id
,qmitem(_i 0 &q 1|8)
,GetQmItemPath q.name s
,out s
This works:  GetQmItemPath _i s

But when using _i in GetQmItemsInFolder I get the following error:
"expected string    Example converting a numeric variable N to string: str S=N."

#GetQmItemsInFolder    $folder  |   ARRAY(QMITEMIDLEVEL)&a  |  [flags]
folder - folder name, path or +id. Gets all if folder is "".

(I am trying to target the id of the folder in stead of it's path because when using path I get results of items outside the specified folder.)

Is there a way to pass the ID of the folder in GetQmItemsInFolder?


Messages In This Thread
RE: GetQmItemsInFolder, also fetches outside specified folder - by r0n - 09-24-2020, 06:15 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)