web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to fill a control value based on the modification of another control?

(0) ShareShare
ReportReport
Posted on by 1,552
Hi,
 
if let's say we have two controls, control1 and control2... how can we fill control2 based on modification of control1?
currently the word /hi/ is not being filled in control2 when i modify control1, why?
[Form]public class Form1 extends FormRun{    [Control(/String/)]    class control1    {        /// <summary>        ///        /// </summary>        /// <returns></returns>        public boolean modified()        {            boolean ret;                    ret = super();            if(ret)            {               Control2.text(/hi/);            }                    return ret;        }    }
 
I have the same question (0)
  • Martin Dráb Profile Picture
    237,878 Most Valuable Professional on at
    Are the controls bounds to a data source? You code assumes that they aren't - and the assumption may be wrong.
     
    And is it the same data source or two different ones?
  • junior AX Profile Picture
    1,552 on at
    Hi Martin,
     
    Yes bound to a datasource and it's the same data source for both
  • Suggested answer
    Martin Dráb Profile Picture
    237,878 Most Valuable Professional on at
    Then forget individual controls and focus on data sources.
     
    Also, is the logic specific to this single form or should it happen in all cases? If the latter, don't put it on the form at all - put it on the table itself, such as to modifiedField() method.
  • Suggested answer
    Waed Ayyad Profile Picture
    9,039 Super User 2025 Season 2 on at
    Hi 
     
    You Can add your code on form Control (override modified field), or DataSource level by overriding Modified field method, or on Table level. It depends on the logic that you want to apply.
     
    Regards,
    Waed
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 646 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans