Skip to content
CCPEDIAby Unity Nodes
App Development

Get party id as Text (without apostrophes or ticks)

2 posts103 views3 likesLast activity May 2025

  1. WallaceKellyOP 1

    The following Daml Script…

    alice <- allocateParty "Alice"
    let partyText = show alice
    

    …sets partyText to the value 'Alice', including the ticks.

    How can I get a text representation of the party without the surrounding ticks?

  2. WallaceKelly 2

    There is a partyToText : Party -> Text function which does not include the ticks.

    alice <- allocateParty "Alice"
    debugRaw $ "Using show:        " <> (show alice)
    debugRaw $ "Using partyToText: " <> (partyToText alice)
    
    Using show:        'Alice'
    Using partyToText: Alice