Attribute with multiple entries

Hello guys, I'm trying to save multiple entries, where all of them would correspond to the same variable/attribute. So basically, I have one table element where i want several entries. When trying to save the data of a new analysis onto a patient who already had an analysis result saved, it gets replaced. Can someone help me with it?


Best regards,

Lx

Hi SensUs


It looks like you're assigning the .Id attribute of your table. If you want new attributes, rather than replace them be sure to send the Table.Id = NullIdentifier()


Hope this helps!

  -CLSJ

Carlos López Santibáñez Jácome wrote:

Hi SensUs


It looks like you're assigning the .Id attribute of your table. If you want new attributes, rather than replace them be sure to send the Table.Id = NullIdentifier()


Hope this helps!

  -CLSJ


Thank you for your reply! Just to be sure we're talking of the same, we want to be adding different values of a concentration to the same patient Id. Is that what you're talking about? If so, could you elaborate a bit?

Hi Sensus,


you will have to revise your data model.  If you want to be able to store multiple concenctrations for one patient, you will have to model that as a one-to-many relationship, by adding the patient id as an attribute in the concentration table.  And get rid of the concentration attribute in patient.


Then for example, in the StartAnalysis>SAVERESULTSOnClick, instead of updating the patient, you can execute a CreateConcentration, passing in the patient id it is for.


Hope this helps you into the right direction,

Dorine


Edit : This might be a good video to watch

SensUs LxUs wrote:


Thank you for your reply! Just to be sure we're talking of the same, we want to be adding different values of a concentration to the same patient Id. Is that what you're talking about? If so, could you elaborate a bit?


Indeed, as Dorine said, you'll need to revise your data model, I had misunderstood the issue. You need a "Patients table and  a "PatienConcentrations" table which has a Foreign Key to the Patients table.


CLSJ

Dorine Boudry wrote:

Hi Sensus,


you will have to revise your data model.  If you want to be able to store multiple concenctrations for one patient, you will have to model that as a one-to-many relationship, by adding the patient id as an attribute in the concentration table.  And get rid of the concentration attribute in patient.


Then for example, in the StartAnalysis>SAVERESULTSOnClick, instead of updating the patient, you can execute a CreateConcentration, passing in the patient id it is for.


Hope this helps you into the right direction,

Dorine


Edit : This might be a good video t

Thank you Dorine,

I have watched the video and did the entity diagram as suggested, but I'm really confused on how to use it. I tried to create the CreateConcentration action, but what i did seemed extremely redundant.... Any other points you can provide me with?


Kind regards,

Lx

Carlos López Santibáñez Jácome wrote:

SensUs LxUs wrote:


Thank you for your reply! Just to be sure we're talking of the same, we want to be adding different values of a concentration to the same patient Id. Is that what you're talking about? If so, could you elaborate a bit?


Indeed, as Dorine said, you'll need to revise your data model, I had misunderstood the issue. You need a "Patients table and  a "PatienConcentrations" table which has a Foreign Key to the Patients table.


CLSJ

Hello again, thanks for another reply! I've followed Dorine's Suggestions, but still am unsure on how to apply them.. trying to figure it out as I'm writting this but still struggling a bit.

Best regards,

Lx


Hi Sensus,

just show us what you are trying to do, maybe a screen print of your database entity definitions after your changes, and a screenprint of the action you use to add a concentration, and we'll have a look.