How to filter form's grid?

Hello guys,


I want to filter my form's gird by creditId.When I clicked the button,it creates journal and I have a tab called "journal list" in my form.and this gird's datasource is creditjournaltrans. I can see the created journals in there.I want to show my grid ,filter by creditId on journaltrans tab's grid.Now its show the mix journals without filter.My form has multiple datasources like crdtTable,crdtjournaltrans .....I wrote the code on creditTable's datasource methods like this:



public void init()
// QBR = this.query().dataSourceName('CrdtTable ').addRange(fieldnum(CrdtTable,CrdtId));


public void executeQuery()

Can you guys help me please?