Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

How do I search a loaded grid for a value?

(0) ShareShare
ReportReport
Posted on by 1,639

When the user adds a new line to the grid (tasks tab on the Project Maintenance) , I want to check through all  values already in the grid to see if a certain value has been entered before.   The value I am looking at is a new field I have added to the grid - PJPENT.User1.

Can anyone help me please?

*This post is locked for comments

  • Barry Flynn Profile Picture
    3,090 on at
    Re: How do I search a loaded grid for a value?

    Just a couple of quick comments

    Its difficult to "scan existing items in the grid" while a grid line is being entered or modified.

    This is because you need to navigate the array "behind the grid" at a time when the "current" grid lien has not been inserted/updated into that array.

    So, if you do an "mFirst" you will probably clobber the line you are currently working on.

    You may be able to od it at Save time.

    Your code would do something like (and I am typing from memory, so there will be lots of typos

    - use mGetRowNum to find the current grid row number.

    - Use mFirst / mNext to navigare the grid, looking at your value.

    - If you should decide that some sort of error requires fixing, use MessBox to put up the error warning, and set RetVakl to ErrNoMess to prevent the Save from proceeding

    - And, use mSetRowNum, followed by mDisplay to "reset the grid" to "where it was" before you strarted traversing it.

    Hope that's some help...

    Barry

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

#1
Community Member Profile Picture

Community Member 136

#2
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 102 Super User 2025 Season 1

#3
REUser Profile Picture

REUser 8

Featured topics

Product updates

Dynamics 365 release plans