General Component

Fnd_Gen_ComponentInfo

Fnd_Gen_ComponentInfo (component name; info requested) -> Text

Legacy manual page 112

Parameters

ParameterTypeDescription
component nameTextA component prefix
info requestedTextDesired information
Function resultTextInformation requested or an error message

Description

Many of the Foundation components include a method designed to return information about the component or the current status of the component. These information methods are named with the component’s prefix, followed by “_Info” (e.g. Fnd_Loc_Info). In most cases, you will want to call these information methods directly. However, you may want to make a component optional. In this case, you cannot call the method directly, because your structure would not compile if you include a call to a method that does not exist. You can avoid this problem by using the Fnd_Gen_ComponentInfo method. It will call another component’s _Info method, after first checking to see if the component is installed. Pass this method a component name and name for the information you want. If the component exists, Foundation will call its _Info routine, pass it the info label, and return the result. This allows you to get information from a component in a single call, rather than having to first test to see if the component is available.

$language:=Fnd_Gen_ComponentInfo ("Fnd_Loc";"language")

If the component is not installed, “Component Not Available” will be returned.

$language_t:=Fnd_Gen_ComponentInfo ("Fnd_Loc";"language")

If ($language_t="Component Not Available")

$language_t:="EN"

End if

If the component does not have an _Info routine, “Component Did Not Respond” will be returned. We recommend that if a component does not recognize a request it should return the text “Component Did Not Recognize Request”. These values will not be localized so the calling method can test for them.

Extracted source text
            Fnd_Gen_ComponentInfo (component name; info requested) ➔ Text

              Parameter                 Type              Description
              component name            Text              A component prefix
              info requested            Text              Desired information
              Function result           Text              Information requested or an error message

            Many of the Foundation components include a method designed to return information about the
            component or the current status of the component. These information methods are named with the
            component’s prefix, followed by “_Info” (e.g. Fnd_Loc_Info).
            In most cases, you will want to call these information methods directly. However, you may want to make
            a component optional. In this case, you cannot call the method directly, because your structure would
            not compile if you include a call to a method that does not exist. You can avoid this problem by using the
            Fnd_Gen_ComponentInfo method. It will call another component’s _Info method, after first checking
            to see if the component is installed.
            Pass this method a component name and name for the information you want. If the component exists,
            Foundation will call its _Info routine, pass it the info label, and return the result. This allows you to get
            information from a component in a single call, rather than having to first test to see if the component is
            available.
              $language:=Fnd_Gen_ComponentInfo ("Fnd_Loc";"language")

            If the component is not installed, “Component Not Available” will be returned.
              $language_t:=Fnd_Gen_ComponentInfo ("Fnd_Loc";"language")
              If ($language_t="Component Not Available")
                $language_t:="EN"
              End if

            If the component does not have an _Info routine, “Component Did Not Respond” will be returned.
            We recommend that if a component does not recognize a request it should return the text “Component
            Did Not Recognize Request”. These values will not be localized so the calling method can test for them.