More > Media Center 17

gappie: Data type of expression fields

<< < (2/2)

gappie:

--- Quote from: Matt on November 07, 2011, 02:52:13 pm ---There was no solution for non-string expressions before.  You had found a backdoor to change the type, but that's not a less complicated solution.

--- End quote ---
oof.. and i always thought it was the main entrance.  ;)


--- Quote from: Matt on November 07, 2011, 02:52:13 pm ---Here are the supported types (the expression must end with exactly this including brackets around the type):
&DataType=[insert type here]

Where 'insert type here' is one of these
String
List
Integer
Number
Path
Month

Example:
--- Code: ---a;b;c&DataType=[List]

--- End code ---

--- End quote ---
ofcourse i know them and use them sometimes.  8) but i made some test fields and indeed those i never needed, work.. have to go to a bunch of old fields now to see why they dont work anymore. but i guess ill find that.

still i think not disabling the user data settings when enabling the calculated data would be a much easier solution, it always worked that way except for the route (backdoor) around the useless disabling.

anyway, i am looking forward to what 17 will bring.
thanks matt

 :)
gab

Matt:

--- Quote from: gappie on November 07, 2011, 04:25:38 pm ---still i think not disabling the user data settings when enabling the calculated data would be a much easier solution, it always worked that way except for the route (backdoor) around the useless disabling.

--- End quote ---

Yes, that would be easier in the case of fields.  I'm not exactly sure why it's like that.  One trick is that expressions are often used outside of fields (panes, columns, etc.) and those places also need a way to specify a type.

Another solution would be for the expression editor to have a way via the menu to say "treat the output from this expression as this data type."

gappie:
i agree matt. remember, before for using datatype=[ list ] in library fields, you had to set the user data to list before making the calculated data using lists. as in this thread: http://yabb.jriver.com/interact/index.php?topic=57477.msg390024#msg390024.. and many more.
haven't tested lists yet, but i think the problem always was (and still is) that this datatype expression is to much hidden and not clear for most people, but can be so essential to get what you are after. so adding it to the menu for expressions and library fields would make it much more clear and easier to use expressions.

 :)
gab

marko:
I've used this "back door" solution on so many fields... I've also linked to gappie's threads from the expressions page on wiki, touting it as a viable solution to this issue.


--- Quote ---still i think not disabling the user data settings when enabling the calculated data would be a much easier solution, it always worked that way except for the route (backdoor) around the useless disabling.
--- End quote ---
On the surface, this would appear to be the simplest solution, as well as keeping the "&DataType=" appendages for use in expressions elsewhere.

While we're on the subject, when using the listbuild() and listcombine() functions, in my mind, "&datatype=[ list] is implied, I mean, why else would anyone use these expressions... Even though I know, everytime, I have to go back in and add the datatype specifics after the fact!!

-marko

Navigation

[0] Message Index

[*] Previous page

Go to full version