Skip to content
Simon Kelly edited this page Feb 5, 2015 · 1 revision

LedgerDB External Instance Definition

The LedgerDB External Instance defines an artificial instance interface for XForms in CommCare as a mechanism to access ledgers

LedgerDB Instance Structure

The LedgerDB instance connector has the following structure

<ledgerdb>
    <ledger entity-id="">
                                           <!-- The ledger associated with an entity -->
                                           <!-- entity-id: The ID of the entity the ledger is attached to. There is at most one <ledger> element for each unique entity-id -->
        <section section-id="">
                                           <!-- A section inside of the ledger, containing values -->
                                           <!-- section-id: the ID of a particular stock. Used to differentiate different types of entries. -->
            <entry id=”” exponent=""/>     <!-- The value of an entry being tracked in this section -->
                                           <!-- @id: The id of the entrywhose quantity is being tracked. -->
                                           <!-- @exponent: [Not implemented yet] The 10^N exponent that should be applied to this value for the "Real" value -->
        </section>
    </ledger>
    ...
</ledgerdb>

LedgerDB URI

The URI to acquire a reference to the Ledger database is:

jr://instance/ledgerdb