Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

How to keep selected line on datasource using temporary table ?

(2) ShareShare
ReportReport
Posted on by 205
Hi all,

Is there a way to keep selected line on grid if i use a datasource made with temporary table ?

On regular datasources we could use datasource method like ds.research(true) or maybe use positionToRecord.

In my case it's not working, maybe because of selectionChanged method used on the same form grid.

Could someone enlight me please ?

Regards.
Categories:
  • Waed Ayyad Profile Picture
    Waed Ayyad 6,695 Super User 2024 Season 2 on at
    How to keep selected line on datasource using temporary table ?

    Hi, 

    Is your issue resolved? If yes, mark the answers that helped you as verified

    Thanks,

    Waed Ayyad

  • Suggested answer
    Waed Ayyad Profile Picture
    Waed Ayyad 6,695 Super User 2024 Season 2 on at
    How to keep selected line on datasource using temporary table ?
    Hi,
     
    Do you have more than one DataSource on the form?
     
    Try this code:
     
    formDS.reread();
    formDs.rereadreferenceDataSource();
    formDS.research(true);
     

    Thanks,

    Waed Ayyad

    If this helped, please mark it as "Verified" for others facing the same issue

     
     
  • Awaxx Profile Picture
    Awaxx 205 on at
    How to keep selected line on datasource using temporary table ?
    Hi Arnaud,

    Thank you to let me explain deeply my issue.

    Like i said i got a form grid using a datasource made by temporary table.

    There i have to select only a row or multiple rows and use a radio button with many values that i use to update a specific field, when i select a line and click on this radio button to update the field, the selection go up on the first row but i need to keep the last line selected.

    I usually use datasource method research(true) to keep the line i selected but there i tried it but didnt get the result expected like explained just before.

    Should i explain more ?
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,861 Super User 2024 Season 2 on at
    How to keep selected line on datasource using temporary table ?
    Hi Awaxx,
     
    Can you explain your question please? What is going where you need to retain a selected line? Are you refreshing the table with e.g. updated data? What you do mean by "not working"?
     

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,540 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans