Solved

Do defaults work on Formlist?

  • 28 September 2023
  • 3 replies
  • 65 views

Userlevel 2
Badge +5

We’re developing a screen that makes use of a formlist, however we’re struggling a bit with getting a default to work. Is it a known limitation of the formlist that these do not work or are we simply doing something wrong?

When looking in the Dev tools at the Network calls I do not see a default being called. The default is really straightforward and should always fill in a value, its something like this

select @date_column = getutcdate()

Would love some help 😁

icon

Best answer by HarryA 26 October 2023, 11:18

View original

This topic has been closed for comments

3 replies

Userlevel 6
Badge +16

Defaults in the formlist have not yet been implemented. If you feel this feature needs a higher priority then feel free to create an idea in the ideas section. 

Userlevel 2
Badge +5

Hi @Erwin Ekkel ,

thanks for the confirmation that a default is currently not supported in the formlist. 

For anyone stumbling upon this question in the future. We’ve managed to get a DYI default working by combining a handler and change detection. 

Since a formlist directly saves it changes, you can write a handler that mutates the data (like you’d would have written a default). You then only need to add change detection to this table to retrieve this modified data. 

Userlevel 2
Badge +5

@Erwin Ekkel I am not able to change the answer to this question myself, but if you’re able to maybe it would be better to set my reply as the answer since it offers a workaround.