writeToDataStoreEntity vs writeToMultipleDataStoreEntities

it saves when I use this:

a!writeToDataStoreEntity(
              dataStoreEntity: cons!AF_EXCELPIPELINE_CONS,
              valueToStore: local!pipelinetest
            )

but does not save when I use this: 

a!writeToMultipleDataStoreEntities(
              valuesToStore: {
                a!entityData(
                  entity: cons!AF_EXCELPIPELINE_CONS,
                  data: local!pipelinetest
                )
              }
            )

why is that so?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Associate Developer

    The a! writeToMultipleDataStoreEntities method writes multiple CDT values to multiple entities within the same data store based on your input. Make sure your parameters are correct.

    Here's an example of using a!MultiDataStoreEntities to store data from local variables on the click of a button.

    a!localVariables(
      local!name: a!map(name: "D", age: 18),
      a!buttonWidget(
        label: "Submit",
        saveInto: {
          a!writeToMultipleDataStoreEntities(
            valuesToStore: a!entityData(
              entity: cons!DAF2_consProm,
              data: local!name
            )
          )
        }
      )
    )

Reply
  • 0
    Certified Associate Developer

    The a! writeToMultipleDataStoreEntities method writes multiple CDT values to multiple entities within the same data store based on your input. Make sure your parameters are correct.

    Here's an example of using a!MultiDataStoreEntities to store data from local variables on the click of a button.

    a!localVariables(
      local!name: a!map(name: "D", age: 18),
      a!buttonWidget(
        label: "Submit",
        saveInto: {
          a!writeToMultipleDataStoreEntities(
            valuesToStore: a!entityData(
              entity: cons!DAF2_consProm,
              data: local!name
            )
          )
        }
      )
    )

Children