Home » Developer & Programmer » Forms » Disable/Enable current item in tabular block (Oracle Forms 10g)
Disable/Enable current item in tabular block [message #308210] Sat, 22 March 2008 01:57 Go to next message
eshta
Messages: 33
Registered: February 2006
Location: Saudi Arabia
Member

Hi to all,

I have a tabular block, I want to know how to disable or enable the current text item in the block not all the instances of it.

the funciton: set_item_instance_property doesnt have any attribute to disable the item only can control update_allowed. but I don't want that.

Regards
Re: Disable/Enable current item in tabular block [message #308232 is a reply to message #308210] Sat, 22 March 2008 09:57 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
According to SET_ITEM_PROPERTY instructions, current item's ENABLED property can not be modified. Besides, how did you imagine that: you are already in the item and now, all of the sudden, you want to disable it? Disable it before entering the item!

Also, what advantage do you see in disabling only the current item? How did you plan to modify other records' items? Once you move focus to another record, the current item will also change so you'd have to disable it as well.

What are you, actually, trying to do? If you could describe it, perhaps someone might suggest a feasible solution.
Re: Disable/Enable current item in tabular block [message #308336 is a reply to message #308232] Mon, 24 March 2008 01:18 Go to previous messageGo to next message
eshta
Messages: 33
Registered: February 2006
Location: Saudi Arabia
Member

Littlefoot wrote on Sat, 22 March 2008 09:57
According to SET_ITEM_PROPERTY instructions, current item's ENABLED property can not be modified. Besides, how did you imagine that: you are already in the item and now, all of the sudden, you want to disable it? Disable it before entering the item!

Also, what advantage do you see in disabling only the current item? How did you plan to modify other records' items? Once you move focus to another record, the current item will also change so you'd have to disable it as well.

What are you, actually, trying to do? If you could describe it, perhaps someone might suggest a feasible solution.


The item is in a deatiled block...There data will be fetched from LOV in the master block will affect the detail one.
In the LOV button, if the that value fteched for the item in detail block, the item should be disabled from modifieng.
If the user wants to create new record in the detail block then the new instance from that item will be enabled to enter the data.

In short words, all the feteched items from the LOV, should be disabled from modifieng.
Re: Disable/Enable current item in tabular block [message #308839 is a reply to message #308336] Tue, 25 March 2008 11:52 Go to previous messageGo to next message
solisdeveloper
Messages: 48
Registered: March 2008
Location: Mexico
Member
Listen:
I'm currently working in something similar, I have a tabular block with 10 records showing at the same time. The End-User is supossed to enter data of many containers but some of them can be either empty or full, so acording to the state of the container, the items for weight, merchandise, etc should be enabled or disabled independently.

In my case i needed as well to enable or disabled only the current instance of the item, so that if empty containers where listed among full containers, only the empty ones had disabled fields (Lleno/Vacio in spanish).

What I had to do was to create a procedure that acording to the state of the container (the value in a list-item) enables or disables the fields that i mentioned above. And then I had to call that procedure in the When-New-Record-Instance trigger of my Detail-Block and also in my When-List-Change trigger on the list-item.

I of course had to use the set_item_property but since this event was being triggered everytime i moved to a record, or everytime i changed the value state of the container i got the result that i wanted wich was enabled and disabled records among each other. And i did the same in the post-query trigger to consult this info as well.

See the attached image to see the end result. Is this similar to what you're trying to do?

Hope this was helpful Smile
Regards!

[Updated on: Tue, 25 March 2008 11:53]

Report message to a moderator

Re: Disable/Enable current item in tabular block [message #310172 is a reply to message #308839] Mon, 31 March 2008 08:18 Go to previous messageGo to next message
eshta
Messages: 33
Registered: February 2006
Location: Saudi Arabia
Member

Yes the same, so I have to use set_item_property... for enabling and disabling the instances of the item in when-new-record-instanc???

I'am not sure but I think I have tried somthing like that but it affected all instances of that item....

Thank you for your help
Re: Disable/Enable current item in tabular block [message #310298 is a reply to message #310172] Mon, 31 March 2008 19:58 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Then use the set_item_INSTANCE_property.

David
Previous Topic: HOW CAN I CREATE RECORD GROUP FROM A TO Z and populate_list (merged)
Next Topic: Check the fmx file whether exists or not?
Goto Forum:
  


Current Time: Sun Dec 04 00:06:56 CST 2016

Total time taken to generate the page: 0.07620 seconds