Skip to main content
Known Participant
Oct 1, 2023 6:23 PM UTC
Question

a!writeToDataStoreEntity

I am trying to use a!writeToDataStoreEntity   to write to into a database , if one on the fields is a (foreign key) which is an auto-generated primary key of another table in the "same interface ", how can i pass it to the other table when it  hasn't been generated yet?   

    5 replies

    Known Participant
    Oct 1, 2023 6:27 PM UTC

    or i am obliged to use process models and script task?

    New Participant
    Oct 2, 2023 7:59 AM UTC

    You can use a!startprocess() to first write in the first table and then use its primary key in the second table 

    mathieud0001
    Genius
    Oct 2, 2023 9:49 AM UTC

    If you are using 23.2 and lower you'll need to do in with 2 writes wrapped in a Process Model called with a!startProcess. If you are on 23.3, you can simply create a nested Record type with relationships and it will take care of it for you.

    New Participant
    Oct 13, 2023 11:14 AM UTC

    Ok, thank you sir. I will try it and if I still face any issue, I will update you by starting my own thread. 

    rishikeshr4182
    Inspiring
    Oct 3, 2023 7:29 AM UTC

    You need to do these things inside a process.

    Rishikesh