How to use From( %Relation ) in a #Prompt

I’m having trouble using %relation.
I have fixed a file: #Fix(%file,%this file
and tried a #Prompt.

#Prompt('Related Files',From(%relation)),%relfile

%relation is a multi-valued symbol of all files that are related to the file (from the help.) FROM requires a multi-valued symbol, but the list comes up empty. Is there another way to display and choose from a list of files related to the file? Or is there a better way to indicate which file is THE file?
I have been able to obtain the information needed with a work-a-round, but use of %relation seems so direct, it should be feasible.
Any help is appreciated; thanks.

OK, having read what you’re trying to do :wink: I suspect you need to use a #PREPARE to load a user defined variable with a list of related files. Something like this…

#PREPARE
  #DECLARE(%ChildFilesList),UNIQUE
  #FIX (%File, %WhateverFileYouHave)
  #FOR (%Relation)
  #IF (%FileRelationType = '1:MANY')  ! CHILD files only
      #ADD(%ChildFilesList,UPPER(%Relation))
  #ENDIF
#Prompt(‘Related CHILD Files’,From(%ChildFilesList)),%relfile
2 Likes