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?

So you have two tabs - one with data source crdtTable and other with crdtjournaltrans.

If so, do you have a relation between these two tables? How these two data sources are joined in the form?

in crdtjournaltrans’ s dataseource properties,joinsource is credittable.

What is the linkType on crdtjournaltrans data source?
And do you have a relation with crdtTable.CrdtId on crdtjournaltrans table?

link type is delayed ,I checked there is no relation

Try by creating a relation on CreditId (crdtTable.CrdtId == crdtjournaltrans.CrdtId)

oh it worked,I thought I hould give filter or someting but basically giving a realiton to edt is the solution