SQL Connector query to fetch last inserted record primary key

Tagged:
  • anuragkumar
        5 years ago #15389

        Hi Team,

        I have a scenario here, I have a parent table related with a child table in SQLite db. When I save the parent table details in first screen by a SQL connector call (to run a insert command), I want to get the primary key as well. This is needed because in the subsequent step after parent table detail submission, on the next screen , I want the user to enter the details for the related child table. But this would need me to get the primary key of the record inserted in the previous step to map the child table details to the correct parent table record.
        We have different methods in Java Jdbc api to return the inserted record’s primary key, but here in simplifier we have only connector calls. Please let me know how can we achieve this in simplifier, as this is a generic parent-child table use case.

        Regards
        Anurag

        anuragkumar
            5 years ago #15390
            Up
            0
            Down
            ::

            Hi Team, @Chris,

            Anyone please, any hint here is much appreciated, as I am stuck.

            Regards
            Anurag

            Chris Bouveret
                Has successfully completed the online course Introduction
                Has successfully completed the online course Intermediate (200)
                Has successfully completed the online course Advanced (300)
                Has successfully completed the online course Basics (100)
                Has successfully completed the online course Advanced (320)
                Has successfully completed the Intermediate Certification
                Has successfully completed the Advanced Certification
              5 years ago #15395
              Up
              0
              Down
              ::

              Hi there,
              please see this post for a solution https://community.simplifier.io/forum/topic/sql-select-last_instert_id/
              Hope that helps
              Best
              Chris

            Viewing 3 posts - 1 through 3 (of 3 total)

            You must be logged in to reply to this topic.