Input parameters

Input parameters

  

Hi,


Is there any property in parameter that indicates if its a foreign key? Or exists any sys table that do the relation between parameter and and type in an action?


I have an extension where i use reflection to know what input parameters an action has but i cant see if its ref from an entity


actionsType.GetMethods().Where(x => x.Name.Equals(string.Format("Action{0}", accao))).ToList().ForEach(x => x.GetParameters().ToList().ForEach(y =>
                    {
                        if (y.Name.ToUpper().Equals("HECONTEXT") == false)
                        {
                            Attr.ssSTAttrDef.ssAttrName = (y.IsOut == true) ? y.Name.Substring(8) : y.Name.Substring(7);
                            Attr.ssSTAttrDef.ssAttrType = (y.IsOut == true) ? y.ParameterType.ToString().Substring(7).Replace('&', ' ').Trim() : y.ParameterType.ToString().Substring(7);
                            Attr.ssSTAttrDef.ssAttrOut = y.IsOut;
                            action.ssSTAccoes.ssListaAttr.Append(Attr);
                        }
                    }));


Hi Joao,

Please provide more details. your question is not clear.

Suraj Borade wrote:

Hi Joao,

Please provide more details. your question is not clear.

I have an extension that receives an eSpace name and then it gets all actions and the respective in/out parameters. In the above code, the y(parameter) has some properties (Name -> gives parameter name, ParameterType -> gives the type, and IsOut -> flag its Output). My question is, if there is any property to know if its an entity identifier and the corresponding entity name. If not, is there any OSSYS table that keeps that matching. For example, when you create an action, you can add input parameters. That parameters have a type like int, text... but can be entity identifier. That information is saved in any sys table?


Hi João,

You can use the system entity Entity_Attr and check the type colunm. It should give you an SS_Key of the attribute in case it is a foreign key.


Hope this helps.

Ana Reis

Hi Ana,

But in that case you have the Attr name from the entity. In my case i have an action with parameters. For example, i have ActionTest with 3 input parameters (param1, param2 and param3). My param1 name is ExCode and its a entity identifier. I need to know in my extension that ExCode its entityA identifier. I cant find any property to know that information through reflection. If there isnt any property, i can query a OSSYS table that match that action param to entity attr. In your example it helps if i can join another table that have action params that joins through entity attr ID. Do you know if there is any table for that?

Hi João,

I think the platform does not store actions and inputs information on the database.

What information do you get on ParameterType?

I only get the basic type like int32, string etc. The platform should save that information on any table, if not you would loose that info when you close the platform.