I'm struggling to find the correct syntax for saving into a nested CDT from

Certified Lead Developer
I'm struggling to find the correct syntax for saving into a nested CDT from a SAIL dashboard. The snippet below creates a valid paragraph field from my nested CDT value but the saveInto causes an error when updating the form. I am using this style of notation because the elements are generated from an apply function so "IncidentVehicle" and "VehicleMake" are dynamic at runtime. The value will save when hard-coding local!dataArray["IncidentVehicle"].VehicleMake but this isn't an option for me as the .field cannot be parameterized.

a!paragraphField(
label: "CDT Data",
value: index(local!dataArray["IncidentVehicle"],"VehicleMake"),
saveInto: index(local!dataArray["IncidentVehicle"],"VehicleMake")
          )...

OriginalPostID-94523

OriginalPostID-94523

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    Much clearer thanks :o) I can't define the local variable 1st because I don't know if it will exist, i.e. the whole form is dynamic and based on user roles/locations etc. The acp is populated from queryrecord and the results displayed on screen for the user to update.

    I guess my problem is that although I can use index style notation to get the value, I cannot use something like update array to set it back to the new typed value.
Reply
  • 0
    Certified Lead Developer
    Much clearer thanks :o) I can't define the local variable 1st because I don't know if it will exist, i.e. the whole form is dynamic and based on user roles/locations etc. The acp is populated from queryrecord and the results displayed on screen for the user to update.

    I guess my problem is that although I can use index style notation to get the value, I cannot use something like update array to set it back to the new typed value.
Children
No Data