Hi
I have a requirement to edit table where I have to edit only 2 columns and show rest columns as readonly and send those 2 value in another table through process model but the another table where I need to store updated value has empty data thus I'm getting error
please help me how to configure script type when I have to send value of those 2 column along with updated by and updated on in empty table where there is no id created
Mike Schmitt
Discussion posts and replies are publicly visible
Hi appian.user ,
It seems null value is passed to the errored write to record node
yes I have to configure script type such that my etilt log table id gets created and I have to send transmitter id, electrical tilt and comment along with updated by , updated on
Hi appian.user,
As Shanmathi said, it seems like values passed to Write eTilt Log records node is empty. Can you please elaborate on your use-case as well.
hi vimalkumars Shanmathi Ponnusamy
Thanks for respondingmy use case is that, in table where I have to send data is completely empty not even its id is there so for I have to configure script task in such manner that my transmitter id, electrical tilt , comment, updated by and updated on gets mapped along with its id
error must be coming because no id is present in this table where i have to send my data
appian.user Any chance, can you share the structure of Table 1 and Table 2?
table 1:
table 2:
See I have implemented script task such manner but now getting different error
here is my script task code, please correct me where is needed,
I know why i got the error as I havent passed electricaltiltlogid but here I dont know how to pass dynamically if there is no id created in electricaltiltlog table
a!forEach( items: pv!transmitterDetails, expression: if(a!isNullOrEmpty(pv!transmitterDetails['recordType!{5bcd9424-97e1-4cf7-8c9a-db17184cd421}SLS Transmitter Details Sync.fields.{2cebd86f-36bf-41e6-9086-eeb20915eb05}IdSLSTransmitterDetails']), {}, 'recordType!{c789cc3d-962b-4fbc-b773-21a425a60402}SLS Electrical Tilt Log Sync'( 'recordType!{c789cc3d-962b-4fbc-b773-21a425a60402}SLS Electrical Tilt Log Sync.fields.{476add43-ba08-4213-b075-ac7dc744f9ce}transmitterDetailsId':pv!transmitterDetails['recordType!{5bcd9424-97e1-4cf7-8c9a-db17184cd421}SLS Transmitter Details Sync.fields.{2cebd86f-36bf-41e6-9086-eeb20915eb05}IdSLSTransmitterDetails'], 'recordType!{c789cc3d-962b-4fbc-b773-21a425a60402}SLS Electrical Tilt Log Sync.fields.{2575de1f-03b2-4dfc-83ac-3ea4a87cf98f}electricalTilt':pv!transmitterDetails['recordType!{5bcd9424-97e1-4cf7-8c9a-db17184cd421}SLS Transmitter Details Sync.fields.{a5312671-5aa1-46a8-a244-d36d73910a0f}electricalTilt'], 'recordType!{c789cc3d-962b-4fbc-b773-21a425a60402}SLS Electrical Tilt Log Sync.fields.{f159ba09-3ab0-40a5-bc0d-85cf44931da9}comment':pv!transmitterDetails['recordType!{5bcd9424-97e1-4cf7-8c9a-db17184cd421}SLS Transmitter Details Sync.fields.{b7c34245-2c0f-4404-b93f-9d81fd168932}etiltComment'], 'recordType!{c789cc3d-962b-4fbc-b773-21a425a60402}SLS Electrical Tilt Log Sync.fields.{de489f38-75a9-4651-baa1-16a619315969}updatedBy':loggedInUser(), 'recordType!{c789cc3d-962b-4fbc-b773-21a425a60402}SLS Electrical Tilt Log Sync.fields.{430ef790-35f0-4e63-aed6-ce5657e8b46c}updatedOn':now() ) ) )
appian.user You may have to make column isSlsElectricalTiltLog as Auto Generated in your DB
so if there is empty data not even Id in table 2 then its id will be autogenerated after my script task configuration?
Yes, your table will generate Id whenever there is an insert record to the table.
can you confirm if my script task code is correct to save data in table 2 if it is empty data after above issue is resolve