Hi Shubham,
I like Thijs's answer. Let me ask a question about your use case. If the value 2 is given, you want to have two text boxes for the same Attribute or depending on the value, you need to show a set of different Attributes.
Second question, is it for displaying only or for data entry too?
Iy both answers are yes, I’m thinking of using visibility controls (expression) to hide/unhide the GUI parts.
Go Make It
Here's a suggestion:
Domain model:
EntityA: attribute MyInteger
EntityB: attribute MyString, association to EntityA. EntityA can have multiple EntityB's
Page
Now on the page for EntityA you can create an on-change on the MyInteger attribute. Depending on the integer value, you can create EntityB records with an association to EntityA.
You can display the EntityB records via an (editable) ListView widget below the MyInteger attribute.
Good luck!
Thijs