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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

search records in a scrolling window

(0) ShareShare
ReportReport
Posted on by

Hi created a new dexterity window with search box and the scrolling window

The search field in the scrolling window was index Non-Unique Index.

Can somebody tell me where I am making mistake because it is not select the record

if empty('(L) EmpSearch' of window EmployeeSearch) then

                 warning "Please select a record first.";

                else

                                set 'Frstname' of table EmpRate to '(L) EmpSearch';

                    get table EmpRate by number 1;

                                {run script field 'Redisplay Button' of window 'EMP_LOOKUP';}

                    fill window SCR_Employee from current by number 1;

                                focus 'Frstname' of window SCR_Employee  ;

                                run script field 'Redisplay Button' of window 'EMP_LOOKUP';

end if;

 

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Where does this code reside?  when I do a lookup or any kind of scrolling window with search, I put this code inside of a redisplay button, but I see you are calling it so I'm confused.  

    Aaron

  • Community Member Profile Picture
    on at

    For search I have provides new window with find push button on the change event of find button I have written the code

  • Community Member Profile Picture
    on at

    Okay then, here's what I do and it seems to work (pretty similar to the IG programming guide that comes with dexterity).

     

    FIND BUTTON CHANGE EVENT

    run script field 'Redisplay Button' of window EmployeeSearch;

    REDISPLAY BUTTON CODE

    if empty('(L) EmpSearch') then

         warning "Please select a record first.";

    else

         Frstname of table EmpRate = substring('(L) EmpSearch', 1, 15);

         fill window SCR_Employee from current by number 1;

         focus field Frstname of window SCR_Employee;

    end if;

    Now, I use a sort by because I offer more than one way to sort/search for items in my lookups so hopefully this code will still run by defaulting the key to 1.

    Give this a try and let's see what happens.

    Aaron

     

        

     

  • Community Member Profile Picture
    on at

    Hi,

    I have tried the following steps and still unable to fetch record.

    System by default is fetching the first record.

  • Community Member Profile Picture
    on at

    I am assuming you are pulling data from a table that you created?  What are the key segments for the table?  Do you have one created for the field you are trying ot get data by?

    Regards,

    Aaron

  • Community Member Profile Picture
    on at

    Hi for empid i have used primary key and for Frstname i have index with Non-Unique Index

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Shravan Attelli Profile Picture

Shravan Attelli 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans