The Resource_GetInfo() function returns the resource ID and resource name for a form, report, table or table group for a specified series.
Resource_GetInfo(product_ID, type, index, name)
• product_ID – An integer specifying the product ID of the dictionary from which resource information is being retrieved.
• type – An integer specifying the type of resource for which information is being retrieved. Use the following integer values for resource types:
Value |
Description |
---|---|
40 |
Forms |
43 |
Tables |
44 |
Table Groups |
45 |
Reports |
You should consider setting up constants for each of these integer values if you plan to use this function frequently. |
• index – An integer specifying the position in the series resource list from which information is returned. This number must be between 1 and the number of resources of the specified type and series returned by Resource_StartSeriesFill(). Typically, the counter variable for a for loop is used to increment the index parameter from 1 to the number of resources returned by Resource_StartSeriesFill(). For each iteration of the loop, the name and resource ID are read for the resource indicated by the counter variable.
• name – A returned string containing the resource’s display name. Form and table names returned here aren’t technical names as you’ve defined them in your dictionary. Rather, the display name of the main window in the form is returned for forms and the display name of the table is returned for tables.
An integer containing the resource ID of the resource. If the resource can’t be found, the value 0 is returned.
Be sure you use Resource_StartSeriesFill() to count the number of resources for the given type and series before you use this function. The returned count from Resource_StartSeriesFill() can be used as the index limit for a for do...end for statement. The index can be passed to Resource_GetInfo() to add each resource to a list field.
Be sure the series resource lists are up to date before you use this function. You can use the Series Resources utility in Dexterity Utilities to update series resources. |