Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

The data source name XXX is already used. Each data source name must be unique in the query.

(0) ShareShare
ReportReport
Posted on by 550

Hello,

we created a Form with an overwritten init - method.

Within this method we add a new datasource with the name "ANXTMSPackageMeasuringTable1_Filter".

package_DS =  ANXTMSTransportOrderWeightMeasurmentInfo_Q.dataSourceNo(1).addDataSource(tablenum(ANXTMSPackageMeasuringTable), 'ANXTMSPackageMeasuringTable1_Filter');
package_DS.relations(true);

package_DS.joinMode(JoinMode::NoExistsJoin);
package_DS.enabled(false);
qbr2 = package_DS.addRange(fieldnum(ANXTMSPackageMeasuringTable, CompletedWeightBy));

We use this code added Datasource within a method for enable and disable this Filter datasources, according to the settings within the form.

Now our customer want to use the query Form and save the query as Cue to use it on the Home / EP - Page.

After clicking the Cue, this error occur.

DSError.png

How can we avoid this exception? 

Should we use this data source as "real"  Datasource within this form, or is there any other way?

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    294,165 Super User 2025 Season 1 on at
    RE: The data source name XXX is already used. Each data source name must be unique in the query.

    Hi Stefan,

    I do think the easiest way to prevent this issue is by adding the data source to the form or create the cue in the AOT.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,165 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,968 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans