put "items" into next line in field

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

pidobearBUSsb9q
Posts: 34
Joined: Fri Jul 13, 2012 8:40 am

put "items" into next line in field

Post by pidobearBUSsb9q » Wed Aug 01, 2012 4:30 am

Hi

i am trying to put records into a particular field when the user click a button
but every time the user click a second time, the previous record is deleted and the new one is put in.

How to make the new records automatically place in the next line without overwriting the previous?

thanks in advance

cheers
:D :D :D :D

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: put "items" into next line in field

Post by shaosean » Wed Aug 01, 2012 5:06 am

Code: Select all

put TEXT after field "FIELD"

pidobearBUSsb9q
Posts: 34
Joined: Fri Jul 13, 2012 8:40 am

Re: put "items" into next line in field

Post by pidobearBUSsb9q » Wed Aug 01, 2012 5:12 am

shaosean wrote:

Code: Select all

put TEXT after field "FIELD"
hi

thanks for the help

but is didnt work

the code put the next input beside the previous
example: bar and code

result: barcode

expected result:
bar
code

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: put "items" into next line in field

Post by shaosean » Wed Aug 01, 2012 7:25 am

Code: Select all

put TEXT & LF after field "FIELD"


Need to include a LF (linefeed) at the end of the string.. Yes, the LF in the code above is literally the letters LF (still replace TEXT with your text and FIELD with the name of your field)

pidobearBUSsb9q
Posts: 34
Joined: Fri Jul 13, 2012 8:40 am

Re: put "items" into next line in field

Post by pidobearBUSsb9q » Wed Aug 01, 2012 7:32 am

shaosean wrote:

Code: Select all

put TEXT & LF after field "FIELD"


Need to include a LF (linefeed) at the end of the string.. Yes, the LF in the code above is literally the letters LF (still replace TEXT with your text and FIELD with the name of your field)
Thanks it working now

:D

cheers
:D

pidobearBUSsb9q
Posts: 34
Joined: Fri Jul 13, 2012 8:40 am

Re: put "items" into next line in field

Post by pidobearBUSsb9q » Wed Aug 01, 2012 7:41 am

oh can you help me on how to remove the selected or hilited item in the field?

i am using scrolling list field

thanks so much for your help and time :D

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: put "items" into next line in field

Post by shaosean » Wed Aug 01, 2012 8:43 am

You set the hilitedLine property.. I cannot remember if you set it to 0 (zero) or EMPTY but one of those will do it for you..

Code: Select all

set the hilitedLine of field "FIELD" to EMPTY

pidobearBUSsb9q
Posts: 34
Joined: Fri Jul 13, 2012 8:40 am

Re: put "items" into next line in field

Post by pidobearBUSsb9q » Wed Aug 01, 2012 9:03 am

shaosean wrote:You set the hilitedLine property.. I cannot remember if you set it to 0 (zero) or EMPTY but one of those will do it for you..

Code: Select all

set the hilitedLine of field "FIELD" to EMPTY
it not working.
there are no error but it wont delete

where can i set the property?

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: put "items" into next line in field

Post by jmburnod » Wed Aug 01, 2012 9:12 am

Hi pidobearBUSsb9q ,

Use hilitedlines instead hilitedline (one s at the end)

Code: Select all

set the hilitedLines of field "FIELD" to empty
Best regards

Jean-Marc
https://alternatic.ch

pidobearBUSsb9q
Posts: 34
Joined: Fri Jul 13, 2012 8:40 am

Re: put "items" into next line in field

Post by pidobearBUSsb9q » Wed Aug 01, 2012 9:15 am

jmburnod wrote:Hi pidobearBUSsb9q ,

Use hilitedlines instead hilitedline (one s at the end)

Code: Select all

set the hilitedLines of field "FIELD" to empty
Best regards

Jean-Marc
hi jean-Marc

thank for your help
its not working too
:D

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: put "items" into next line in field

Post by jmburnod » Wed Aug 01, 2012 9:51 am

Hi
its not working too
:shock:
I use it all the times
I tested it now and its work for me

Do you have an error message ?
https://alternatic.ch

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: put "items" into next line in field

Post by jmburnod » Wed Aug 01, 2012 10:02 am

Hi pidobearBUSsb9q,

I read
there are no error but it wont delete
Do you want delete the hilitedlines or have no hilitedlines in your field ?

and hilitedline without "s" also work :oops:

Best regards

Jean-Marc
https://alternatic.ch

pidobearBUSsb9q
Posts: 34
Joined: Fri Jul 13, 2012 8:40 am

Re: put "items" into next line in field

Post by pidobearBUSsb9q » Wed Aug 01, 2012 10:09 am

jmburnod wrote:Hi pidobearBUSsb9q,

I read
there are no error but it wont delete
Do you want delete the hilitedlines or have no hilitedlines in your field ?

and hilitedline without "s" also work :oops:

Best regards

Jean-Marc
sorry if it confuse you but i want to delete
:D

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: put "items" into next line in field

Post by Dixie » Wed Aug 01, 2012 11:23 am

Hi...

To un-hilight the highlight of lines in a fld use...

Code: Select all

set the hilitedLines of fld 1 to none
To delete a highlighted line in a fld use...

Code: Select all

 delete line (the hilitedLines of fld 1) of fld 1
be well

Dixie

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: put "items" into next line in field

Post by jmburnod » Wed Aug 01, 2012 12:18 pm

sorry if it confuse you but i want to delete
Don't worry
Post confusionem memoria

Jean-Marc
https://alternatic.ch

Post Reply