Default value with Macro for non-string fields

Stefan Lorenz asked on June 3, 2014 09:29

Hi,

In a field (of a custom table) I'm trying to set a default value from a querystring. This works for fields of string datatype, but not for integers and other non-string data types. I tried something like

{?tagid|(toint)|(default)0?}

which should result in an integer, but the field editor raises an error "Specified default value is not in correct format, please enter integer number."

Is this a bug or am I'm doing something wrong?

Recent Answers


Stefan Lorenz answered on June 3, 2014 09:35

Hm, I just noticed that this isn't working for strings as well. Shouldn't it be possible in v8 to use macros for this?

0 votesVote for this answer Mark as a Correct answer

Stefan Lorenz answered on June 3, 2014 09:44

Nervermind, found it! Obviously it's not enough to enter a macro there, I had to turn the field into some kind of "Macro Mode" by firing up the macro editor. The result looks almost the same, the only visual difference is that in Macro mode the > symbol in front of the field turns into an x. Very confusing...

PS: The Q&A section really needs a way to edit own posts.

2 votesVote for this answer Mark as a Correct answer

Jakub Oravec answered on June 3, 2014 10:51

Hi Stefan,

you are right. In this case, macro must be filled using Edit value dialog (> symbol). More details can be found here.

0 votesVote for this answer Mark as a Correct answer

Brendon McCarthy answered on October 22, 2014 02:07

If you edit the default in a widget, the "Edit Value" dialog exists, but there is no "Edit Value >" option in the widget dialog, how do you set with a macro in that case?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.