Home » Developer & Programmer » Forms » Need help with first record in a block
Need help with first record in a block [message #306308] Thu, 13 March 2008 11:04 Go to next message
solisdeveloper
Messages: 48
Registered: March 2008
Location: Mexico
Member
Hi everyone:

I have a tabular-database block showing at least 10 rows wich contain several items. What i need to do is that when the end-user changes the value of an item, the changes apply to all records for that very same item, for example if the end-user changes the value of the item "city" to chicago, then all the records should have chicago in the item "city".

I have already done a procedure to do so using the duplicate-item built-in; but now what i want to do is to force the user to make those changes in the first record.

Is there a way to ask something like If..first_record...Then? all i keep finding is IF SYSTEM.last_record THEN but that doesn't work for me?
Or is there a way to disable all records except for the first one? Confused

If any one could help me i would realy apreciate it!
Thanks!
Re: Need help with first record in a block [message #306315 is a reply to message #306308] Thu, 13 March 2008 11:28 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
If you have a basket of different colored balls, which ball is the 1st ball?
Re: Need help with first record in a block [message #306317 is a reply to message #306315] Thu, 13 March 2008 11:44 Go to previous messageGo to next message
solisdeveloper
Messages: 48
Registered: March 2008
Location: Mexico
Member
Don't know. the first one i see or grab i guess.
I'm not sure if i understand the question

I mean i dont want to go to the first_record, instead i want to ask if i am positioned on the first_record. Is there something similar to IF SYSTEM.last_record THEN to do what I am triying to do?

[Updated on: Thu, 13 March 2008 11:48]

Report message to a moderator

Re: Need help with first record in a block [message #306349 is a reply to message #306317] Thu, 13 March 2008 16:58 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
There's both, actually; only if you know how to find them Smile
if :system.cursor_record = 1 then
   message('First record');
elsif :system.last_record = 'TRUE' then
   message('Last record');
else
   null;
end if;
Re: Need help with first record in a block [message #306353 is a reply to message #306349] Thu, 13 March 2008 17:50 Go to previous message
solisdeveloper
Messages: 48
Registered: March 2008
Location: Mexico
Member
Littlefoot wrote on Thu, 13 March 2008 16:58
There's both, actually; only if you know how to find them Smile
if :system.cursor_record = 1 then
   message('First record');
elsif :system.last_record = 'TRUE' then
   message('Last record');
else
   null;
end if;



Thanks a lot! That was exactly what I needed, it worked out perfecttly.

Once again thank you for your help
Regards!
Previous Topic: How to connect multiple schemas at a time in Form Builder
Next Topic: Help plss Should a cursor be created in database or program unit in forms like in a package
Goto Forum:
  


Current Time: Thu Dec 05 12:44:44 CST 2024