How to update the join mode in already existed query?

We have the query, which is formed in SysQuery form dynamically as

to copy the data from one model to other model we are giving the filter in ProjForeCastPeriodic dialog as Projects->Dimension.deparment → 023 for this path(PMA-> Periodic->Forecasts->Copy Forecasts)

We have ProjForecastPeriodic query, but it is not having the DimensionAttributeValueSet datasource in it.

But as we are giving the filter with dimension in, with SFK relation query is forming dynamically as

{Query ProjForecastPeriodic object 366ac9c0: SELECT * FROM ProjForecastUnion(ProjForecastUnion_1) JOIN * FROM ProjTable(ProjTable_1) ON ProjForecastUnion.ProjId = ProjTable.ProjId OUTER JOIN * FROM DimensionAttributeValueSet(DimensionAttributeValueSet_1) ON ProjTable.DefaultDimension = DimensionAttributeValueSet.RecId WHERE ((DimensionAttributeValueSet(DimensionAttributeValueSet_1).DEPARTMENTVALUE = N’023’))}

If we give filter with dimension then above query will form with Outer join dimensionAttributeValueSet.

our requirement is this Outer join should be updated with exists join in our classes withouit disturbing the other filters and ranges in previous query. Can we change only this join type in query without loosing the filters and ranges.

Please help us how to make it.

Have you tried to change it? If so, what happened?

If you haven’t tried, why not? You don’t know how to get a reference to a datasource inside a query? Or what’s the problem?