Madhu1
Novice

How to check Rich Text control empty

Hi All,

 

I have a requirement where I need to check if my rich text box is empty or not. How to check that? I guess due to its html elements advance condition is not working. 

 

Regards,

Madhu

0 Kudos
Reply
6 Replies
Perc
Apprentice

Re: How to check Rich Text control empty

Hi Madu, 


 


Thank you for posting this. You can have a look at the following community article based on this. There are two options posted in this case here. 


 


https://community.k2.com/t5/K2-Blackpearl-Forum-Posts/Set-Rich-Text-Box-to-Empty/td-p/96600


 


Kind regards, 


 


Percy

0 Kudos
Reply
Madhu1
Novice

Re: How to check Rich Text control empty

Hi Percy,

 

Thanks for your reply but what I was looking for is just the opposite of it. The article says how to make rich text control empty. But I want to check whether it is empty or not so that I can give a validation message on rich text control being empty. 

 

Regards,

Madhu

0 Kudos
Reply
Not applicable

Re: How to check Rich Text control empty

Hi Madhu,


 


You can try the follow these steps:


 


1. On view created, insert a rich text and button control.


7000i7A5803F5C6556BB1.png


 


 


2. On the button, configure an advanced condition rule that shows a message box.


7002i508FB13366E186AA.png


7006i2ED01933BBE48311.png


 


3. Then configure the Advaned condition rule as illustrated below.


 


7003i7F493D975ADD646C.png


4.  Run the View. When button is clicked, the popup message should validate the rich text control as 'Empty' if the control doesn't conatin any text and vice versa.


7005i1FCF413A24D9E12D.png


Hope this helps.


 


-Sello


 


 


 


 


 


 

0 Kudos
Reply
Madhu1
Novice

Re: How to check Rich Text control empty

Hi Sello,

 

I tried the same way but someone it doesnt go inside the advance condition. I was under the impression that it is because of the default html tags that is populated even when the rich textbox is empty. 

 

Are you using K2 FIVE? I am using K2 4.6.11 and I wanted to know if it is somethin that is added in K2 FIVE

 

 

Regards,

Madhu

0 Kudos
Reply
Not applicable

Re: How to check Rich Text control empty

Hi Madhu,


 


I did the test on K2 five ,on 4.6.11 I experience the same behaviour  you did.


You may need to upgrade to use this feature.


 


Kind regards,


Sello

0 Kudos
Reply
khanh1
Apprentice

Re: How to check Rich Text control empty

Hi,


 


Did you try with simple comparison (a control does not contain a value)?

0 Kudos
Reply