Skip to content

AB#128605 Add vars for incrementalid, id and displayField#2847

Open
Maximo-reliefapps wants to merge 2 commits intomainfrom
AB#128605-new-vars-fro-from-expressions
Open

AB#128605 Add vars for incrementalid, id and displayField#2847
Maximo-reliefapps wants to merge 2 commits intomainfrom
AB#128605-new-vars-fro-from-expressions

Conversation

@Maximo-reliefapps
Copy link
Copy Markdown
Contributor

Description

New variables have been added for the expressions in a form. The variables are:

  • .id: Only for Resources, shows the resource id.
  • .incrementalId: Only for Resources, shows the resource Incremental id.
  • .displayValue: For Resources and Reference data, shows the displayField value selected for the question.

The ticket also required support for static strings, this is already possible be using '', which will render the written string.

Useful links

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (refactor or addition to existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

  • On an expression question, define a static string like: 'Test', make sure 'Test' is rendered on the survey preview, survey record creation and edition and on the records table.
  • On an expression question, reference a resource question with variable <resource>.incrementalId, make sure the resource incremental id is rendered on the survey preview, survey record creation and edition and on the records table.
  • On an expression question, reference a resource question with variable <resource>.displayValue, make sure the value displayed on the resource selection is rendered on the survey preview, survey record creation and edition and on the records table.
  • On an expression question, reference a reference data question with variable <refData>.displayValue, make sure the value displayed on the resource selection is rendered on the survey preview, survey record creation and edition and on the records table.

Screenshots

Screenshot 2026-04-01 at 10 24 51

Checklist:

( * == Mandatory )

  • * I have set myself as assignee of the pull request
  • * My code follows the style guidelines of this project
  • * Linting does not generate new warnings
  • * I have performed a self-review of my own code
  • * I have put the ticket for review, adding the oort-frontend team to the list of reviewers
  • * I have commented my code, particularly in hard-to-understand areas
  • * I have put JSDoc comment in all required places
  • * My changes generate no new warnings
  • * I have included screenshots describing my changes if relevant
  • * I have selected labels in the Pull Request, according to the changes with code brings
  • I have made corresponding changes to the documentation ( if required )
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

More explanation

https://www.loom.com/share/05a716d61b9744faaf51fb304c21d1e5?sid=f87cf896-582a-4f76-93ae-8ceed801b145

@Maximo-reliefapps Maximo-reliefapps self-assigned this Apr 1, 2026
@Maximo-reliefapps Maximo-reliefapps added the changes Changes made to existing features label Apr 1, 2026
@Maximo-reliefapps Maximo-reliefapps changed the title Add vars for incrementalid, id and displayField AB#128605 Add vars for incrementalid, id and displayField Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changes Changes made to existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant