Is there anything in DAML which work like Global variable in any other programming language?

i am making on application on insurance where client is coming with their Request and making CLIENTREQUEST Contract. CLIENTREQUEST Template looks like this :

template CLIENTREQUEST 
  with
    amount_required :Int
    client : Party
    list_of_insurance_provider :Party
  where
     signatory  client
     observer list_of_insurance_provider

My problem is that now client has to provide list of lender and i want to remove this burden from client head.

Is there any way ?

1 Like

Hi @Nishchal_Vashisht, I’m not sure I understand the question. But what you can do to have data available to both parties is to store it in a contract that is observed by both of them. Does that help?

2 Likes

Hi @Nishchal_Vashisht, thanks for trying DAML. As @drsk said, using contracts as global variables is the right approach. If you need the content of this contract to change over time but also require stable references to it, contract keys would be the right way to go: https://docs.daml.com/daml/reference/contract-keys.html

2 Likes