I'm trying to get data from display method and store in tables. So I add that table field in form and enable the filter on it. Thankyou
Help me to do this..
What exactly do you need from us? Do you know how to call methods and how to update records?
Anyway, before you can write any code, you must think about when the value of the field must be recalculated. If just when saving data in this table, simply put your code to insert() and update() (and write a runnable class to update existing records). There call the method and assign the value to a field.
But the display method may depend on other things as well, e.g. a parameter table or the current date. Then you must recalculate all data when anything like that changes, which can make the whole idea impractical.
Another approach would be using a view with a computed column, but it's also not practical in all cases. For example, sometimes the display method uses a lot of logic that isn't easily translatable to T-SQL.
Yet another approach is calculating the values when opening the form and storing the values in a temporary table. It means worse performance of the form, but you don't have to worry about maintaining DB consistency.
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,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156