We want to make an alert within an inputbox that is related to an action (view) that leads to an increased attribute indicating that it has exceeded a maximum number of characters. Do you know how to achieve this?
Hi Maicol,
so you have an inputbox and when the input exceeds a given number of characters you want to give a warning correct?
If the warning can happen right away in the view, I would suggest you write the input from the inputbox to a runtime variable and then have a KPI checking the length of that variable, giving appropriate warnings. You can then display the KPI right next to your input box:
- Create Runtime variable: Name = value_box_input, the value has to be one space
- Create KPI in your knowledge model: Name = Value Box Check, PQL = CASE WHEN len('${{input_box_value}}') > 10 THEN 'Input to large' ELSE 'Input Valid' END
- Create your input box with the following yaml:
type: input-box
settings:
type: string
value: ""
onChange:
update:
variables:
- name: input_box_value
placeholderText: Type your input
Then you can place your KPI in a KPI-List component right next to your input box and see the screenshot for how it would look like:Let me know if that helps or if you have a question about it.
Best,
Tim
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.