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 :
Finance | Project Operations, Human Resources, ...
Answered

Filter data on form with TempDB data source

(3) ShareShare
ReportReport
Posted on by 472
Hello
I have a form with following functionality
 
The form has 5 data sources with TempDB tables which are not joined to each other. The data source data is displayed on 5 separate grids. 
When the form opens, the data needs to be populated on the form. There is a custom Save button and clicking on it, data needs to be copied from all of these individual data source and stored in a seperate regular table one for each of these tempdb datasources. The save can happen multiple times and data can be stored in the table for every new version which is unique by a number.
there is another form control with drop down on these versions. when a user picks a specific version the data needs to be loaded on the form for that specific version.
I am adding code to populate the temp table on modified event and calling research method. But the data on the form does not reflect on what I populate in code, eventhough I populate the datasource for that specific version. 
Categories:
I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    303,995 Super User 2026 Season 1 on at
    Hi SKO,
     
    Can you share your coding and screenshots of the current behavior? That will help in understanding what exactly you try to achieve.
  • SKO Profile Picture
    472 on at
    I am looking for code to clear the grid data and update it as per the input parameters.
     
    
    
    [DataSource]
    class ProdOrderTmp
    {
        /// <summary>
        ///
        /// </summary>
        public void init()
        {
            if (rev)
            {
                this.loadProdOrderTmp();
            }
                
            super();
        }
    
    	//When form opens load the temp table grid from saved data
        public void loadProdOrderTmp()
        {
    	    ProdOrderTmp        prodOrdersTmp;
    		Prodorders          prodorders;  
    
        while select prodorders        
        {
            prodOrdersTmp.clear();    
            
            prodOrdersTmp.Rev           = prodorders.Rev;
            prodOrdersTmp.ProdId        = prodorders.ProdId;        
            prodOrdersTmp.Description   = prodorders.Description;
            
            prodOrdersTmp.insert();
        }
        ProdOrderTmp.linkPhysicalTableInstance(prodOrdersTmp);
       }
       
       public void executeQuery()
       {
    	   delete_from prodOrdersTmp;
    	   
    	   while select prodorders
    	        where prodorders.rev == rev
    	   {
    			prodOrdersTmp.clear();    
            
    			prodOrdersTmp.Rev           = prodorders.Rev;
    			prodOrdersTmp.ProdId        = prodorders.ProdId;        
    			prodOrdersTmp.Description   = prodorders.Description;
    			
    			prodOrdersTmp.insert();
    	   }
    	 super();
       }
    
    on the Form control, here is the parameter field. When the field value changes, 
    the data on form grid should change accordingly. i,e clear the grid and update 
    with data related to the parameter 
    
    public boolean modified()
    {
        boolean ret;
    
        ret = super();
    	
    	rev = this.value();
    	
    	ProdOrderTmp_ds.executeQuery();
    	
    	return ret;
    }
     
  • Sukrut Parab Profile Picture
    71,735 Moderator on at
    In your above code I don't see research method. Where are you calling it ?
  • Verified answer
    SKO Profile Picture
    472 on at
    I was able to achieve this by using only one tempdb buffer for each temp table for all operations and linking it in Datasource Init() using the below call  specifically after the super()
     
    ProdOrderTmp.linkPhysicalTableInstance(prodOrdersTmp);

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 March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 653

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 463 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 308 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans