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

Certified Associate Developer

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.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    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.

Reply
  • 0
    Certified Lead Developer

    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.

Children