> For the complete documentation index, see [llms.txt](https://help.ica.illumina.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.ica.illumina.com/project/p-flow/f-pipelines/json-based-input-forms/onrender.js.md).

# onRender.js

Receives an input object which contains information about the current state of the input form, the chosen values and the field value change that triggered the onrender call. It also contains pipeline information. Changed objects are present in the onRender return value object. Any object not present is considered to be unmodified. Changing the storage size in the start analysis screen triggers an onRender execution with storageSize as changed field.

#### Input Parameters

<table><thead><tr><th width="235"></th><th></th></tr></thead><tbody><tr><td>context</td><td><p>"Initial"/"FieldChanged"/"Edited".</p><ul><li><strong>Initial</strong> is the value when first displaying the form when a user opens the <em>start run</em> screen.</li><li>The value is <strong>FieldChanged</strong> when a field with <code>'updateRenderOnChange'=true</code> is changed by the user.</li><li><strong>Edited</strong> (Not yet supported in ICA) is used when a form is displayed later again, this is intended for draft runs or when editing the form during reruns.</li></ul></td></tr><tr><td>changedFieldId</td><td>The id of the field that changed and which triggered this onRender call. context will be <code>FieldChanged</code>. When the storage size is changed, the fieldId will be <code>storageSize</code>.</td></tr><tr><td>analysisSettings</td><td>The input form json as saved in the pipeline. This is the original json, without changes.</td></tr><tr><td>currentAnalysisSettings</td><td>The current input form json as rendered to the user. This can contain already applied changes form earlier onRender passes. Null in the first call, when context is <code>Initial</code>.</td></tr><tr><td>settingValues</td><td>The current value of all settings fields. This is a map with field id as key and an array of field values as value for multivalue fields. For convenience, values of single-value fields are present as the individual value and not as an array of length 1. In case of fieldGroups, the value can be multiple levels of arrays. For fields of type <em>data</em> the values in the json are data ids (fil.xxxx). To help with validation, these are expanded and made available as an object here containing the <em>id</em>, <em>name</em>, <em>path</em>, <em>format</em>, <em>size</em> and a boolean indicating whether the data is <em>external</em>. This info can be used to validate or pick the chosen storageSize.</td></tr><tr><td>pipeline</td><td>Information about the pipeline: code, tenant and description are all available in the pipeline object as string.</td></tr><tr><td>analysis</td><td>Information about this run: userReference, userName, and userTenant are all available in the analysis object as string.</td></tr><tr><td>storageSize</td><td>The storage size as chosen by the user. This will initially be null. StorageSize is an object containing an 'id' and 'name' property.</td></tr><tr><td>storageSizeOptions</td><td>The list of storage sizes available to the user when creating an analysis. Is a list of StorageSize objects containing an 'id' and 'name' property.</td></tr></tbody></table>

#### Return values (taken from the response object)

<table><thead><tr><th width="191">Value</th><th>Meaning</th></tr></thead><tbody><tr><td>analysisSettings</td><td>The input form json with potential applied changes. The discovered changes will be applied in the UI.</td></tr><tr><td>settingValues</td><td>The current, potentially altered map of all setting values. These will be updated in the UI.</td></tr><tr><td>validationErrors</td><td>A list of RenderMessages representing validation errors. <strong>Submitting a pipeline execution request is not possible while there are still validation errors.</strong></td></tr><tr><td>validationWarnings</td><td>A list of RenderMessages representing validation warnings. <strong>A user may choose to ignore these validation warnings and start the pipeline execution request.</strong></td></tr><tr><td>storageSize</td><td><p>The suitable value for storageSize. Must be one of the options of input.storageSizeOptions. When absent or null, it is ignored.</p><p>validation errors and validation warnings can use 'storageSize' as fieldId to let an error appear on the storage size field. 'storageSize' is the value of the changedFieldId when the user alters the chosen storage size.</p></td></tr></tbody></table>

#### RenderMessage

This is the object used for **representing validation errors and warnings**. The attributes can be used with first letter lowercase (consistent with the input object attributes) or uppercase.

<table><thead><tr><th width="204">Value</th><th>Meaning</th></tr></thead><tbody><tr><td>fieldId / FieldId</td><td>The field which has an erroneous value. When not present, a general error/warning is displayed. To display an error on the storage size, use the <code>storageSize</code>Fieldid.</td></tr><tr><td>index / Index</td><td>The 0-starting index of the value which is incorrect. Use this when a particular value of a multivalue field is not correct. When not present, the entire field is marked as erroneous. The value can also be an array of indexes for use with fieldgroups. For instance, when the 3rd field of the 2nd instance of a fieldgroup is erroneous, a value of [ 1 , 2 ] is used.</td></tr><tr><td>message / Message</td><td>The error/warning message to display.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.ica.illumina.com/project/p-flow/f-pipelines/json-based-input-forms/onrender.js.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
