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, ...
Answered

Index for checkbox with empty value

(0) ShareShare
ReportReport
Posted on by 260

Hi guys,

I have a table which allows multiple Items, but only one record can be primary.

I created an index which consist in Item and PrimaryItem field. However, the PrimaryItem field is a checkbox, and even when the value is No 

it will trigger preventing the user to create a new record. Only one Primary Item field can exist.

How can I accomplish this? Is it validatedWrite() the only way? 


Example:

Table

ItemId | Info1 | Info2 | PrimaryItem (Checkbox No::Yes)
Item1  | info   | info    | Yes

Item 1 | info   | info    | No

Item 1 | info   | info    | No

I have the same question (0)
  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi bois0155,

    Yes. Modifying validateWrite looks like the only way out here. You can't create an index using any of the fields to achieve this requirement.

  • Verified answer
    MuthukumaranAX Profile Picture
    2,903 on at

    Hi - adding field to index which has default value (in your scenario No) is not suggested, but it is requirements then you can achieve this through  validatewrite method

    Thanks

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 611 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