Addlink in query with two expressions tied with or not and

Hi All,

I need a query join like this

select a join b where a.code == b.code1 || a.code == b.code2;

how can I write this code with addlink and/or visual query builder if possible?

I tried this but I’m still getting error about paranthesis, there’s no paranthesis error:

qbds2.addRange(fieldnum(hrmcoursetable,hrmcourseTypeId)).value(strfmt("( (%1.%3 == %2.%4) || (%1.%3 == %2.%5) )",
q.dataSourceTable(tableNum(hrmcoursetable)).name(),
q.dataSourceTable(tableNum(krc_CourseTypeRelations)).name(),
fieldstr(hrmcoursetable,hrmcourseTypeId),
fieldId2Name(tablenum(krc_CourseTypeRelations),fieldId2Ext(fieldnum(krc_CourseTypeRelations,ETGHRMCourseTypeId),1)),
fieldId2Name(tablenum(krc_CourseTypeRelations),fieldId2Ext(fieldnum(krc_CourseTypeRelations,ETGHRMCourseTypeId),2))));