Forum FlexPro – Discuss your topic!

How can I access all objects in the root folder with FPScript?

Accueil > Community > FPScript > How can I access all objects in the root folder with FPScript?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12546
    Richard WeisangRichard Weisang
    Keymaster

    I need to access multiple datasets in the root folder of the explorer dynamically.

    #8880
    Bernhard KantzBernhard Kantz
    Participant

    There is a property names “ObjectNames” to obtain the names of objects in a folder. Optionally this property accepts “wildcard” characters to restrict the object to be addressed.
    The syntax to access the root folder is “.fld”. Once you have the list of object names, you can use the indirection operator $$ to access the objects.

    The following example computes the global maximum of all datasets beginning with “data”:

    
    Dim names, max, globalmax, i
    
    names = .Fld.ObjectNames("Data*")
    
    For Each Value i In names Do
    	max = Maximum($names$)
    	If DataType(globalmax) == TYPE_EMPTY Or max > globalmax then
    		globalmax = max
    	End
    End
    
    globalmax
    
    #8881

    Hello!

    How can I proceed in the same way in FlexPro Version 5?

    #8209
    Richard WeisangRichard Weisang
    Keymaster

    I need to access multiple datasets in the root folder of the explorer dynamically.

    #8882
    Bernhard KantzBernhard Kantz
    Participant

    This is not possible in FlexPro 5. This functionality was introduced in FlexPro 6.

    Support
    support@weisang.com

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.