Skip to main content

Notifications

Community site session details

Community site session details

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

Grid Control on form and use of display method and while

(0) ShareShare
ReportReport
Posted on by 511

Dear Experts

Hope all are fine and safe.

Need your support to solve the issue

I have two tables

Frequncy master-Item id, frequency

Inventsserial-Itemid, status, sub part id(1 item id in frequency master can have many sub part id)

I have new customized form where

item id, countoftstatus(taken from inventserial like machine, available, issued etc) 

I want to get count of subpart which are due in last 15 days(today-15 dayd back) and display on grid

The issue is

in display method if i write while select table a join table b where iitemid==itemid , and put that display on grid, the form takes time to load and also the grid flcikers

If i add addcachemethod in the init of form datasorce the user cannot open the form(not sure what cacheaddmethod has to do with user opening forms)

can you please tell me how can i use while loop in display method and also make sure the form dont take time to load and the grid is not blining(the grid only blinks because of while loop and while loop use only retrives correct values)

  • MuthukumaranAX Profile Picture
    2,901 on at
    RE: Grid Control on form and use of display method and while

    Hi - instead of using join, can you try using exist join and check the code.

    thanks

  • vinitgoyal2005 Profile Picture
    6,330 on at
    RE: Grid Control on form and use of display method and while

    Hi,

    Share your code so it is easier for us to help you.

  • Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: Grid Control on form and use of display method and while

    Please share the code you have currently so that we can look for a solution.

  • NDingankar22 Profile Picture
    511 on at
    RE: Grid Control on form and use of display method and while

    Thanks for the quick reply. I have written the diplay method on the frequency master same like above

    However if i use the select loop it dont retrieves value as it dnt loop through all records hence using the while loop ig loops through all the reords

    how do i loop the records if not use of while

  • Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: Grid Control on form and use of display method and while

    Hi,

    Could you please share the code you are using for display method?

    Is the code at the form level or at the table level?

    Also, why are you using while select? Can you not do a count(recId)

    Counter numofSubPart;
    
    slect count(RecId) from table A
        join tableB where tableB.ItemId == tableA.ItemId;
      
    numofSubPart = tableA.RecId;
    
    return numofSubPart;
    

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,304 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans