- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I would like to create a Percentage Type variable that can only have integer values between 0 and 100. I can't see a way of specifying such a type. The only limits that I can see are those that can be applied is to dimensions, not values. Am I missing something, please?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could make your percentage variables/types within a module and make use of public an private attributes. You could make some functions such that the percentage types are set / modified/ accessed via module functions that enforce some rules perhaps. Not knowing axactly what you are trying to do it is hard to be more specific.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This doesn't answer your question about creating a type that can only have the values 0 to 100, but you can force values between 0 and 100 by using
Value = Min(Max(Value,0),100)
Regards,
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could make your percentage variables/types within a module and make use of public an private attributes. You could make some functions such that the percentage types are set / modified/ accessed via module functions that enforce some rules perhaps. Not knowing axactly what you are trying to do it is hard to be more specific.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page