Hi,
I am trying to write data into DB using record type which is multiple.
Process variable had data correctly but when it is writing into db the data is writing as null though source fields and record fields data type is same and structure is same.
Can someone help me on this?
Discussion posts and replies are publicly visible
Difficult to say. I think we need a bit more detail and background.
ok. the figure above shows the data which I am trying to insert into db using write records smart service from process model. But when I am going into db to see the data.
Below is the data in db.
it is writing as null though the data is there in process variable
The versionNumber and the noticeId seem to be OK. Did you validate that the primary key ID is the correct one? Did you check that data is not overwritten by another process or a node further down the process.
So, when I investigate such an issue, I repeat the following for each step in the data flow:
- What is my expectation?
- What is my intention?
- What did I actually do?
- What do I observe?
- Does it deviate from my expectations?
No the data is not overwritten by any process and also primary key id is also fine
What does "fine" mean? The "Write Records" node returns the new PK of the data written. Do you see the exact same IDs in process and DB?
I know these questions can be annoying, but we really need more details and context.
In a recent podcast episode we discuss how to get great answers: appian.rocks/.../
yes it was returning primary key correctly. When I say correctly it means the ID returned by Write to records and the ID present in DB are same
OK. But this issue affects only a subset of the fields. Something must be wrong. But with the limited information I have, I cannot help you in your analysis.
No Problem. But thanks for the help..
I know it's silly thing to ask because at first i thought of something overwriting it but you are so sure it's not. Only thing i can think of is the record fields and source fields Mapped correctly?? Can you confirm it please??
yes its not overwriting and source fields and record fileds mapped correctly.
Tthis data is coming from other system where I am extracting the data from the Json Structure and mapping to recordtype where it mapped correctly and storing in Process Variable.
Is this a synced record? Do you see any difference in the data when querying in Appian vs. looking at the DB?
Did you check the tomcat stdout log file for any issues?
Did you check the sync log of that record?
Unknown said:Do you see any difference in the data when querying in Appian vs. looking at the DB
She is saying "write records" not writing all the data from process variable to DB. She can't find few column values, that's odd .either it's overriding or mapping issue from appian or from DB(triggers..etc.,).
Hello Hemaashri
Is this data by any chance a related record data? My guess is yes. What are you doing to the data. Is there any script task before this write records node where you are updating the data? Or are you handling it in a single Variable in the Interface?