GabrielVA
26th May 2011, 17:50
Hi guys,
So I want to validate a read only field in a session. I tried to use a check.input but it doesn't work. Basically when someone wants to search for a PO in the session, I want a message to pop up if their is nothing in that field. I need some guidance on code please. The following is what I have in the field choice script but its not working, i guess b/c check.input is not the correct method to use??
field.tilit111.sqap:
check.input:
if (tilit111.sqap = "") then
set.input.error("")
message("SQAP missing. Contact the IT for more information.")
endif
mark_h
26th May 2011, 20:45
Not sure I really understand how you want this to work, but you can try to check this field in choice.def.fnd section, maybe using the before choice section.
mark_h
26th May 2011, 20:46
PS - these type threads should really go into the tools forum.
GabrielVA
26th May 2011, 21:06
Hey Mark,
Basically I have a lit session (tdlit2122m000) that in which a user chooses a PO number and it populates the session. The end user has requested that there be a messagebox on one of fields that pops up when they choose the PO and theres nothing in this field (which is called tilit111.sqap).
Make sense? Sorry Its been a while since I posted, I should have in the tools section. My bad. :(
mark_h
26th May 2011, 22:44
Another option is in the after.input section on the PO. You can check this field(for current displayed PO or retrieve this field for the newly input PO), if empty then pop up the message. Of course I am assuming the user will hit the find button and then enter a po. The session will then take the newly entered PO, go look up this field and display a message if blank. So that is another option.
GabrielVA
27th May 2011, 15:09
Ok thanks Ill give that a trey and let you know.
BaaNovva
8th February 2013, 13:54
Your validation usage is entirely wrong. Use the following :
First create a message for "SQAP missing. Contact the IT for more information".
Assume the message code to be as "tilit111.01"
Then do the following -
field.tilit111.sqap:
check.input:
if isspace(tilit111.sqap) then
set.input.error("tilit111.01")
endif
This should work.
mark_h
8th February 2013, 15:15
Your validation usage is entirely wrong. Use the following :
First create a message for "SQAP missing. Contact the IT for more information".
Assume the message code to be as "tilit111.01"
Then do the following -
field.tilit111.sqap:
check.input:
if isspace(tilit111.sqap) then
set.input.error("tilit111.01")
endif
This should work.
The field is read only so check.input will not work.
MilindV
27th February 2013, 12:54
When exactly you are populating the table?
I assume you must be having code to populate table in after.choice of def.find section.
In this case you can check if you got any records with given input and table remains empty return back error message, also you can check if order number field is empty return back error message and execute def.find again explicitly
choice.def.find:
after.choice:
if isspace(orno) then
message("Your Message")
execute(def.find)
else
success = populate.records()
if not success then
message("Your Message")
execute(def.find)
endif
endif
Hope this helps.