Skip to content

allow data-f-foreach to have access to enumerated ranges for time-based models #99

Description

@mmrj

it would be nice to have something similar allowed (syntax negotiable, etc.):

<table>
	<th>Initial Sales</th>
     <tbody data-f-foreach="r in region">
         <tr data-f-foreach="p in product">
             <td><%= r %></td><td><%= p %></td><td><%= Initial Sales[r,p] %></td>
         </tr>
     </tbody>
 </table>

for the case where /v2/model/introspect for this model returns

  "ranges": [
    {
      "indices": [
        "apple",
        "orange",
        "banana"
      ],
      "name": "product",
      "saved": false,
      "type": "Subscript Range"
    },
    {
      "indices": [
        "east",
        "west"
      ],
      "name": "region",
      "saved": false,
      "type": "Subscript Range"
    }
  ],
  "variables": [
    {
      "name": "Initial Sales",
      "saved": false,
      "subscripts": [
        "region",
        "product"
      ],
      "type": "Auxiliary"
    },
]

(currently, this only works if region and product are separately model variables)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions