Scenario:
I have 3 fields in table 1: ID, name, phone Num
In table 2 i have Id and Name.
I have created relation between tables
Requirement: When i select id in table 2 i should get name of that person in name field.
How to achieve this ??
can we achieve this using display method?
*This post is locked for comments
Thank you Suthar...I have achieved the result by this method....When i use modify method the fetching is delayed...
Hi, If ID is a primary key field in both tables, then why you need to store name again, just show it using display method from table 1 (master table) like custTable and salesTable, you just have to select customer account and it will automatically display the name from masters...
What is your scenario:
1. If you want to fetch the data from table 1 with respect table 2 ID , Assume ID is the relation between two table.
if you want to display in in same buffer
you can write modify method to display
select firstonly table1 wher t1.id = t2.id
t2.name = t1.name
of if you don't have bound control you can write display method in tabel and display in UI and do the cache
same way
purblic display EDt meth()
{
select firstonly table1 wher t1.id = t2.id
return table1 .name whatever.
}
Please need more info for deatils.
use modifiedField() method on Table2 and write a switch case with example as under
public void modifiedField(FieldId _fieldId)
{
super(_fieldId);
switch (_fieldId)
{
case fieldNum(Table2Name, Id):
Table2Name.NameField = "any value";
break;
}
}
Hi, you can achieve this with an edit method, also see Axaptapedia. Also, there are many examples of this in the application.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,134 Super User 2024 Season 2
Martin Dráb 229,928 Most Valuable Professional
nmaenpaa 101,156