Welcome!
This community is for professionals and enthusiasts of the Genio platform.
Share your questions and challenges, and help your partners!
Human key access
Hello,
Is it possible to access the human key of the table in the function '<form>_Edit_Redirect' in '<form>_FormController'?
If so how can I get that value?
Hi,
Here is an example of the possible code:
var evenp = CSGenioAevenp.search(UserContext.Current.PersistentSupport, "KEY_VALUE_TO_SEARCH", UserContext.Current.User);
// HumanKeyName => contains list of human key fields of the table. ex: desginac,layrname
string humanKeyInfo = evenp.Information.HumanKeyName; //string humanKeyFields = CSGenioAevenp.GetInformation().HumanKeyName;
string [] humanKeyFields = humanKeyInfo.Split(',');
// var evenp = new CSGenioAevenp(UserContext.Current.User); evenp.QPrimaryKey = "KEY_VALUE_TO_SEARCH"; evenp.getFields(humanKeyFields, UserContext.Current.PersistentSupport); // <= alternative to select form DB just human key fields values
foreach (var humanKeyField in humanKeyFields)
/* result += */ evenp.returnValueField("evenp." + humanKeyField);
Keep Informed
About the Community
Question tools
Stats
Asked: 03/07/20, 13:57 |
Seen: 1622 times |
Last updated: 22/08/20, 15:40 |