This topic is locked

Change text according to condition result

4/11/2023 3:55:10 AM
PHPRunner General questions
author

Hello all.
Can anyone help me in following:
I have inserted a text HTML box on list page(TablePartners).
I want to change a text in that box after the list page is opened(shown) according to condition:

  • If first record of TablePartners = 1 TextBox.text = "there are records!" else* TextBox.text = "no records!"
    I suppose that this code should be added in EVENTS of that list page.
    How can I get this?

T
Tim 4/11/2023

Make 2 HTML boxes and show/hide based on condition.

Sergey Kornilov admin 4/11/2023

What is " text HTML box" and how exactly you inserted it? Is that one of PHPRunner built-in features or you have done it using a code snippet?
Also, do you need to execute this code just once, when the page is loaded or is there more functionaliy required?

502110 4/12/2023

In the Designer, I have inserted HTML text. In the properties I see ItemID = "text".
I want to change displayed text according to database field conditions...
I hope I am clear.