Skip to main content
April 29, 2024
Solved

Appian Record Doesn't give primary keys in Output

  • April 29, 2024
  • 28 replies
  • 1 view

Hello Everyone,

There is an issue in Write Records Smart Service

Its not giving as output with/of primary keys in the Output section 

 

It works for a record which takes single value as input but not working for array pv!

 

Please ping if anyone has faced this issue before, We,ve tried everything but nothing is working

Thanks in advance.

    Best answer by chandhinir0002

    I see that you have used construct expression rule to form the record type structure. Can you remove the Primary key field from the expression rule and then try running write to records smart service.

    28 replies

    stefanhelzle0001
    April 29, 2024

    Can you share more details? What does "We,ve tried everything" mean?

    Any code snippets, configuration details, error messages?

    Appian version is crucial. This feature changed a few times.

    April 29, 2024

    Hi Stefan,
    We're currently on 24.1 version of appian  below are the ss of configuration 
    The pv which is shown is the one in Input part of write records also

    stefanhelzle0001
    April 29, 2024

    Talking about input, did you configure anything on that "Input" tab? What about the tab "Setup"?

    karthikk538
    April 29, 2024

    Hi Rahul,

    Can you recheck if you are capturing data into multiple type pv!

    Can you share the configurations of the node?

    April 29, 2024

    Hey Karthik!
    Yes the pv is of multiple type 

    jurajb9535
    May 30, 2024

    I am experiencing the same situation. I am on cloud version 24.1 and the latest version of the smart service Write Records (Write Records and Related Records (internal3.write_records_to_source_23r3)) is not returning primary key in AC!RecordsUpdated, even though new row is inserted into database. Firstly, I thought I am going crazy, but then I copied old version of this smart service (Write Records 23.2) from old process model and it works without problems. If it's a global problem on all 24.1 environments then it am surprised it is not giving problems to more people.

    Is anybody else able to simulate latest Write Records smart service on their 24.1 environment to see if they get the primary key back or not?

    Appian Cloud Version: 24.1.460.0

    stefanhelzle0001
    May 30, 2024

    Yes, the behavior of this node has changed. I described this in my blog post.

    But not returning any PK ?!?! This might be a stupid question, but could it be that you have a misconfiguration in the node? E.g. a conflicting assignment in inputs -> saveInto vs. an assignment in outputs, both writing to the same PV.

    jurajb9535
    May 30, 2024

    Sure, I am aware of a different behaviour between these 2 versions but indeed the problem is I just simply cannot get the PK out of this Write records node.

    I don't think any misconfiguration is happening here but you can double check screenshots.

    I also tried writing into other record type to rule out problem with just specific record type. The same result, no PK returned in AC!RecordsUpdated.

    Are you able to create simple PM with just Write Records smart service whether it works for you on 24.1 version?

    varunb579494
    September 18, 2024

    I'm facing some kind of similar issue on 24.2 version of Appian cloud. I'm trying to generate a unique code for submitted application with primary key and a string literal using concat function. I'm first writing the application data using Write record and save the output in the pv. Then, I've another Write record node after it where I'm using update function to just update the same pv's data with concatenated string and then writing that data. But, I'm not able to fetch the primary key. It just appends "-id" rather than the actual primary key which was already generated in previous Write record. Any help appreciated.

    /resized-image/__size/640x480/__key/communityserver-discussions-components-files/16/Screenshot-2024_2D00_09_2D00_18-at-8.10.28_2F20_AM.png

    Configuration for Write Scholarship Details

    /resized-image/__size/640x480/__key/communityserver-discussions-components-files/16/Screenshot-2024_2D00_09_2D00_18-at-8.22.23_2F20_AM.png

    /resized-image/__size/640x480/__key/communityserver-discussions-components-files/16/Screenshot-2024_2D00_09_2D00_18-at-8.22.08_2F20_AM.png

    Configuration for Update Scholarship Code

    /resized-image/__size/640x480/__key/communityserver-discussions-components-files/16/Screenshot-2024_2D00_09_2D00_18-at-8.09.38_2F20_AM.png

    /resized-image/__size/640x480/__key/communityserver-discussions-components-files/16/Screenshot-2024_2D00_09_2D00_18-at-8.25.57_2F20_AM.png

    Process History

    /resized-image/__size/640x480/__key/communityserver-discussions-components-files/16/Screenshot-2024_2D00_09_2D00_18-at-8.30.53_2F20_AM.png

    /resized-image/__size/640x480/__key/communityserver-discussions-components-files/16/Screenshot-2024_2D00_09_2D00_18-at-8.27.32_2F20_AM.png

    konduruc733182
    September 18, 2024

    Here is the mistake.

    Please use concat("SCH-",pv!scholarship[your field index])

    you need to mention the data holder from which you want to index the value.