Skip to main content
priyankam7887
September 29, 2023
Question

Adding new row in DB on every new user interaction using write to multiple data store entity

  • September 29, 2023
  • 4 replies
  • 0 views

Hi, 

I am saving candidate details and interview details of that candidate into DB and using write to multiple data store entity.

here TA will schedule a round and task assigned to L1 interviewer,  likewise, L2 and L3 but the issue is after every user interaction, a new row in the database. I am using multiple data store entity .

For both the candidate and interview  CDT primary key is set and it is autoincrement.

Please suggest if I am doing anything wrong.

    4 replies

    mikes0011
    Brainy
    September 29, 2023

    Is there a particular reason you're writing the initial entry using "write to multiple DSE" node instead of the regular single one?  They will both work, but the single one simplifies the process of saving the resulting DB value back into the process PV.  This is clearly not happening in your case if every write is creating a new row.

    FYI the configuration seen in your screenshot here seems to be completely incorrect.  For reference, if this is in the output of the WT(m)DS node, you would need to access "ac!StoredValues", because even if you're saving "stored values" into a PV, the "custom output" where you're trying to access that PV value won't actually have a value yet.  Further, StoredValues represents an ARRAY of ARRAYS of stored data (of all types), and you're trying to save it all into ".candidateId" (presumably a single integer), which will basically do nothing at all.

    priyankam7887
    October 3, 2023

    i am trying to update candidate data in the candidate table and interview data in the interview table from the same process the rsn am using  write to multiple data store entity.

    mikes0011
    Brainy
    October 3, 2023

    This still isn't enough detail to go on, if you're expecting to find specific help here.  Did you correct the things I pointed out to you that are configured wrong?