Load Resource by name

I have to load the resource using the name of the resource, so that resource imported in to resources section of the outsystem should be loaded. Is there any API exists to load it and return as a string? Also, is there a mechansim to load a file from the file system as a binary data/Text?

In between, how the multi tenancy is achieved in the resources section, i dont see any tenant related things in the resources section.


For loading files from the filesystem you can use the Filesystem component in the forge. Note that your IIS/Jboss user needs to have permissions to access the files. The extension has methods to read both binary or text files.

As for reading resources directly from resources by name I don't think it's possible. You can access the binary value them in expressions inside Service Studio (then you can use the BinaryData extension to convert to text), but not by name.

There is no multitenancy at the resources level. What type of resources are you thinking about to have that requirement?

One way to solve both your problems (access by name and multitenancy) would be to place the information in the database. Guess it depends on the frequency/size of your access to it and how it would affect performance.

João Rosado