cancel
Showing results for 
Search instead for 
Did you mean: 

Visibility and invisbility of text field

Former Member
0 Kudos

Hello Gurus,

This is the requirement :

I have to make the textfield visible when data is available otherwise textfield should be in invisible mode when data is not avilable.

Can you provide me the code to write in the events.Its urgent.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

[code]if ( $.rawValue == ' ' ) then

$.presence = "hidden"

endif[/code]

write this code on the field, if the field is text field use space else compare with initial value of that field type ( 0 or 0.00....)

Former Member
0 Kudos

Hello Sir,

I am getting the data from table through data connection.

When we bind the field to the text field.If the data is available for the field it should be visible otherwise the text field should be invisible.

Thanks

Former Member
0 Kudos

hi,

if you are designing the form in SFP transaction, in the context you can define condition on that table field as <> space.or

you can write the script on that filed or on table subform.

Former Member
0 Kudos

Hello Sir,

Can you please send me the code in script to handle the event.

Thanks

Former Member
0 Kudos

hello pavan,

i have written this code for hiding my field -


object.presence = "hidden";

it is working fine. But now i want to display this when my field (object) is initial.

How to check the Field(object) value.

i have use

if object.rawvalue == ' ' then

object.presence = "hidden";

endif

but it is not working.

Can u please help me out how to check the value of the field........... please help me out it's urgent............

Thanks,

Feroz.

Former Member
0 Kudos

You have to write the above script on that perticular field in formcalc and Form:ready event

Former Member
0 Kudos

Feroz,

Use the event Form:ready event,if the field is text field you have to use space else 0 or 0.00

Former Member
0 Kudos

Hello Pavan,

I had given the textfield name as emp.

Down is the code which i had pasted in the event Form Ready

Its not becoming invisible.

if ( emp.rawValue == ' ' ) then

emp.presence = "hidden"

endif

Former Member
0 Kudos

if you writing script on that emp field , you have to use $.rawvalue.

if you are writing the code on the subform superior to that emp field you have to use $.emp.rawvalue

Former Member
0 Kudos

Hello Pavan,

I have kept the code $.rawValue in the event which you had given.

But it is not working.

Thanks.