Skip to content

Add single choice dropdown to a form, get values from different table #480

Answered by castlekaybee
castlekaybee asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the quick reply. It works beautifully.

However I cannot get the dropdown to show the value currently set in the given record. Adding

,2 as value

or any other number or string does not preselect the dropdown. It always shows the first item from the options.

SELECT 'Aggregatstyp' AS name,
  1 AS required,
  'select' as type,
  15 as value,
  (SELECT
      at_id AS value,
      kurzname AS label
  FROM
      BasisAggregatsTyp
  FOR JSON AUTO) as options;

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@lovasoa
Comment options

@castlekaybee
Comment options

Answer selected by castlekaybee
Comment options

You must be logged in to vote
1 reply
@castlekaybee
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants