Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing Multi-Select Options in YAML Template ? #4

Open
Fog3719 opened this issue Jun 19, 2024 · 1 comment
Open

Implementing Multi-Select Options in YAML Template ? #4

Fog3719 opened this issue Jun 19, 2024 · 1 comment

Comments

@Fog3719
Copy link

Fog3719 commented Jun 19, 2024

I am a Beancount user with limited programming experience, and I'm currently facing a challenge that I hope you can help me with.

I am trying to define a dropdown list in a YAML template, which I am using to organize my data. However, I am unsure of the correct syntax to use for creating a dropdown list that includes multiple options.

Could you please provide me with a simple example or guide on how to set up a dropdown list in a YAML file? I would greatly appreciate any help or resources you could share to assist me in resolving this issue.

- name: example-fund-trading-record
  display_name: "Example Fund Trading Record"
  fields:
  - name: date
    type: date
    display_name: "Date"
    required: true
  - name: price
    type: number
    display_name: "Price"
    required: true
  - name: share
    type: number
    display_name: "Share"
    default: "100"
    required: true
  - name: account
    type: account
    display_name: "Account"
    default: 
    creatable: true
    options:
        - option1
        - option2
  - name: bankaccount
    type: str
    display_name: "Bank Account"
    default: "DefaultBank"
  - name: amountspent
    type: number
    display_name: "Amount Spent"
    default: "500"
    required: true
  - name: narration
    type: str
    default: " "
    display_name: "Narration"
  operations: 
  - type: append
    file: "forms/examplefile.beancount"
    content: |
      {{ date }} ! "Online Fund Purchase"  {{ narration | tojson }}
        Assets:Investment:MarketIndex:ExampleFund      {{ share }} ExampleFund { {{ price }} USD ,{{date}} } 
        Assets:Savings:Checking:{{ bankaccount }}                            -{{ amountspent }} USD
@fangpenlin
Copy link
Contributor

Currently we don't have a dropdown type field option, so this is not possible for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants