Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

Form with multiple data sources

Posted on by 572

Hi Experts,

I have a requirement that in a form I need to have two different data sources, for example Table A and Table B. In the form design I have two tabs for each table fields. There is a number sequence set for a field in the Table A. My problem here is when I enter the fields in the first tab (Table A) and when I click on the second tab the data which I entered in Table A is getting saved. I don't want to happen this, it should save the record only when I fill the details in both the tabs and press ok command. No idea why it is saving the record when I am switching the tabs. Any help please.

Thanks 

  • Martin Dráb Profile Picture
    Martin Dráb 230,214 Most Valuable Professional on at
    Form with multiple data sources
    Your description is very brief, but you didn't mention anything about the topic of this thread (how to prevent saving when switching to a different data source), therefore your question doesn't seem to belong here.
     
    Please create a new thread explain your particular scenario and problem there. Please include more details, because it isn't currently clear what you need.
  • KE-25091748-0 Profile Picture
    KE-25091748-0 15 on at
    Form with multiple data sources
    Hi, do you mind telling me how you were able to show a tab for each data source? I'm in the same position, would like to add data from table 2 to the main form from table 1, as editable text areas, option sets, etc. and not lookups, but no luck.
     
    Thanks 
  • D365  beginner Profile Picture
    D365 beginner 572 on at
    RE: Form with multiple data sources

    Thanks Mr. Nikolaos for your valuable input. I have decided to go with temporary tables instead of actual data tables.

    May I ask you one more thing, In the same above form, can I make mandatory fields in the form from both data sources ? Imagine I use two data sources in the form Table A (Header) and Table B (grid) having a relation between them which could be an employee number. I need the user to fill the header part and  at least one record in the grid before closing the form. Can I make use of validatewrite() here ? If yes how ?

    Thanks in advance.

  • Verified answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Form with multiple data sources

    Records on forms are saved whenever you move to another record on the same or different data source. You can't prevent this. Only one record at a time can remain "unsaved".

    If you need the user to complete a more complex data entry including multiple records and/or multiple tables, and save it only once the user is done, you should have temporary tables as your form data sources. When the user clicks OK, you would then save data to the actual tables.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans