Uploaded image for project: 'HTML Form Entry Module'
  1. HTML Form Entry Module
  2. HTML-535

Allow velocity expressions to be used as inputs for any field

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: TBD
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: HTML Form Entry 2.6
    • Labels:
      None
    • Complexity:
      Medium

      Description

      For instance, in Mirebalais we'd like to default the encounter location to a location referenced by a certain obs (where the location_id is stored in value_text). So it would be nice if we could do something like this:

      <encounterLocation default="$fn.latestObs('some-concept-uuid').valueText" />

      I'd guess the best way to do this would be to specify some sort of format to identify something as a velocity expression, and then parse all velocity expressions in a form before processing the main tags.

      Alternatively, when handling each individual tag we could check to see if each attribute value represents a velocity expression, but this seems like it would be harder to implement globally, as each tag parses it's own attribute individually, I believe.

      (fwiw, for the MIrebalais use case, to achieve the same affect quickly I just used a <lookup> tag and javascript setValue(), but this is more complicated and somewhat hacky)

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              mseaton Mike Seaton
              Reporter:
              mogoodrich Mark Goodrich
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: