Page 1 of 1

Limit string length

Posted: Wed Apr 16, 2014 11:15 pm
by nayitian
Hi, I am fairly new to TM1.
I have an string element in a measure dimension, can you please tell me if it is possible to write a rule in order to prevent users from keying in more than 1000 characters? Or maybe some other solutions?
Thank you.

Re: Limit string length

Posted: Wed Apr 16, 2014 11:26 pm
by rmackenzie
A cell cannot, at the same time, allow a rule and an input value. So, no, you can't write a rule to enforce a maximum input length. 1000 characters input to a string measure is quite a lot for a TM1 application although your users may be copying and pasteing data in? Perhaps if you give a bit more context, someone will have a good suggestion.

Re: Limit string length

Posted: Wed Apr 16, 2014 11:52 pm
by macsir
No, can't think of any. Rule is not supposed to prevent key-in errors besides rule-driven cells don't allow key-in operation. How about a picklist in the cube view?

Re: Limit string length

Posted: Thu Apr 17, 2014 12:02 am
by Alan Kirk
nayitian wrote:Hi, I am fairly new to TM1.
I have an string element in a measure dimension, can you please tell me if it is possible to write a rule in order to prevent users from keying in more than 1000 characters? Or maybe some other solutions?
As Robin implied, TM1 isn't like a relational database where you have the option of constraints. About the only workaround available for that is to have an input element and an evaluated element, with the evaluated element pulling through a validated version of the input value via a rule. In this case the evaluated value would be (up to) the first 1,000 characters from the input cell.

Re: Limit string length

Posted: Thu Apr 17, 2014 1:15 pm
by nayitian
Thank you all for helping.

What I am having here is, that I have a measure dimension which has a quite few string items, users are going to input very detailed explanation through web form. The string column contents are quite larget, let alone the line/paragraph format.
So, pick list cannot be a solution, I have been seeking other ways to keeping users from typing too much.

Re: Limit string length

Posted: Thu Apr 17, 2014 3:32 pm
by jim wood
If you're using an input template (excel) then why not validate via a TI process. Have cells that users enter data into (There's no need for DBRW formulas in the cells) and then pass the values as parameters to a TI process via an action button. Then validate the values within the process.

Re: Limit string length

Posted: Thu Apr 17, 2014 6:04 pm
by nayitian
jim wood wrote:If you're using an input template (excel) then why not validate via a TI process. Have cells that users enter data into (There's no need for DBRW formulas in the cells) and then pass the values as parameters to a TI process via an action button. Then validate the values within the process.
Thanks Jim.

Actually I was thinking of using TI. I was able to validate the input though, is there a function that prompts the user as alert if his/her input exceeds the string limit, right after submitting the action button through active form? Again, I am very new to TM1, just seeking your expertise to check the possibility.

Thank you

Re: Limit string length

Posted: Thu Apr 17, 2014 6:12 pm
by jim wood
If you use a TM1 action button your options are a little limited when it comes to communication with the user. This however might be an evil you have to live with if you want the users to access the template via TM1 Web. If however they will be accessing the template via excel you have more options open to you. You could use a macro button instead and kick off the process via VBA. To be fair at this point you could wrap the data validation in to VBA as well, then you have the option of sending the information via TI or you could use restricted DBS formulas as well, but again that all hinges on the entry method in to the template,

Jim.