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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Init the value of a specific field in a grid

(0) ShareShare
ReportReport
Posted on by 66

Hello,
For a time, I was stuck on this problem.
I add a formComboBoxControl to a grid, but I need to filter the Enum values, so I use the class "SysFormEnumComboBox" to complete the job, and everything works well. The issue is that when I use the "SysFormEnumComboBox," the control must not be bound to a datasource field or method, thus when I open the form again, the previously saved values cannot be displayed on the screen since I can't discover where to put the code to fill the data in the control.

pastedimage1667213604790v1.png

I select the value (exp: Pourcentage)

pastedimage1667213769549v2.png

when I reload the page, I can't insert the data, so no data displayed

pastedimage1667223304878v3.png

I have the same question (0)
  • TNGrizzly Profile Picture
    66 on at

    Thank you, Girish this solved my problem

  • GirishS Profile Picture
    27,829 Moderator on at

    If you want to filter the enum values - You can add the code in form control enter method to filter values.

    Add a datasource bound control - On the control - override the enter method and add the below code.

    public void enter()
    {
        super(); 
        this.delete(enum2str(YourEnumName::Other));
    }

    Also you can filter enum values based on the condition also. This enter method will be called every time you click on combo box control.

    Thanks,

    Girish S.

  • TNGrizzly Profile Picture
    66 on at

    Hello GirishS 

    "I add a formComboBoxControl to a grid, but I need to filter the Enum values"

  • GirishS Profile Picture
    27,829 Moderator on at

    Hi TNGrizzly,

    If you want to save the field value it must be bound to datasource. So that selected value will be stored in the table.

    So next time when you open the form it will fetch data from the table and display.

    If you are using a control which is not bound to datasource - it is impossible to save the control values.

    What is the issue in creating a datasource bound control? Do you want to filter the enum values?

    Thanks,

    Girish S.

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

News and Announcements

Season of Giving Solutions is Here!

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
Abhilash Warrier Profile Picture

Abhilash Warrier 843 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

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

#3
Martin Dráb Profile Picture

Martin Dráb 325 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans