Update Record field Value in expression

Certified Associate Developer
  • I have an interface where collecting the information & storing in record type. 
  • Then sending this record type rule input to process model to store in db using write records 
  • However before that write records node, I need to update a few of the fields of the record type. 

I have tried to update the fields using the following expression, however the data which got from interface is becoming null and record type is updating only with the expression values. Can any one pick it up and shoot it?

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer

    Hi Shukur

    Instead of a!update, create two custom outputs and save in respective fields. E.g. 1st output variable expression will be "RAJ12344" and  saveinto will be your recordtype!recordname.fields.username. Similarly 2nd output variable will have true() in expression and save into isActive field of your record. This will leave all other fields of your record as it came from interface. 

    a!update() is making all other fields as null and doing operation on just the fields you mention in 'index'. So either do the above or mention all the fields in the index and corresponding values in 'value' of a!update.

    a!update(
    pv!applicantInfo,
    {recordtype!record.userName, recordtype!record.isActive, recordtype!record.createdBy, recordtype!record.createdOn},
    {"RAJ12344",true(),recordtype!record.createdBy, recordtype!record.createdOn})

  • 0
    Certified Associate Developer
    in reply to Harsha Sharma

    Hi Harsha,

    Thank you so much for your reply. Yep I knew that however I was looking for a easy approach that should save in one go instead of creating multiple custom outputs for each field. 

Reply Children
No Data