# Use Lookup as a float or int value

**URL:** <https://community.viktor.ai/t/use-lookup-as-a-float-or-int-value/2327>\
**Category:** Feature Requests\
**Tags:** sdk, status:in-discussion\
**Created:** [18 November 2024 10:50 UTC](https://community.viktor.ai/t/use-lookup-as-a-float-or-int-value/2327 "2024-11-18T10:50:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomasvdl](https://community.viktor.ai/letter_avatar_proxy/v4/letter/t/b782af/32.png) [@thomasvdl](https://community.viktor.ai/u/thomasvdl)\
**Post date:** [18 November 2024 10:50 UTC](https://community.viktor.ai/t/use-lookup-as-a-float-or-int-value/2327/1 "2024-11-18T10:50:59Z")

</div>

I would like to be able to use Lookup as a float or int value, for instance like:  
`other_parameter = IntegerField("another parameter", min=1000, max=10000)`  
`param = IntegerField("sample", min=min(10, 0.1 * Lookup("other_parameter"))`

---

<div class="post-metadata">

**Author:** ![mslootweg](https://community.viktor.ai/user_avatar/community.viktor.ai/mslootweg/32/25_2.png) [@mslootweg](https://community.viktor.ai/u/mslootweg)\
**Post date:** [19 November 2024 12:05 UTC](https://community.viktor.ai/t/use-lookup-as-a-float-or-int-value/2327/2 "2024-11-19T12:05:30Z")

</div>

Hi @thomasvdl ,

Thank you for your feature request. I believe what you want to achieve is a dynamic way of setting the minimum and maximum of a `NumberField` or `IntegerField`. This feature request was already described here:

> [@Dynamically set max, min on slider variant of number field](https://community.viktor.ai/t/dynamically-set-max-min-on-slider-variant-of-number-field/1819):
>
> Hi, I would like to request that the max and min options of the number field can be set dynamically based on output of another process. In my case, I want the user to be able to sample the data in my plotylanddata view using the slider to determine at which level the information should be supplied for. The level will change based on ground levels at the project site which could have a large variation and I dont want the slider to be wide ranging. Rather better that the slider covers the range o…

For visibility, this is already possible by using callback function: [User input, fields and buttons - Hide a field | VIKTOR Documentation](https://docs.viktor.ai/docs/create-apps/user-input/hide-field/#using-a-function)

---

<div class="post-metadata">

**Author:** ![thomasvdl](https://community.viktor.ai/letter_avatar_proxy/v4/letter/t/b782af/32.png) [@thomasvdl](https://community.viktor.ai/u/thomasvdl)\
**Post date:** [19 November 2024 12:24 UTC](https://community.viktor.ai/t/use-lookup-as-a-float-or-int-value/2327/3 "2024-11-19T12:24:40Z")

</div>

I think you are right and upvoted the other request 👍
