Page 1 of 1
deleting value of the same in other field or menu buttons
Posted: Fri Aug 03, 2012 7:23 am
by pidobearBUSsb9q
Hey guys
i am trying to delete a value from a field/menu button that have the same value with the other field/menu button
which mean
the same value of the 2 field/ menu button would be gone if i delete anyone of them.
thanks
cheers

Re: deleting value of the same in other field or menu button
Posted: Fri Aug 03, 2012 7:45 am
by shaosean
- put the text of the field/menu into a variable
- put the
lineOffset into a variable
- if the lineOffset variable is greater than 0; delete line (lineOffsetVariable) of (fieldMenuVariable)
- set the text of the field/menu to (fieldMenuVariable)
Re: deleting value of the same in other field or menu button
Posted: Fri Aug 03, 2012 7:58 am
by pidobearBUSsb9q
shaosean wrote:- put the text of the field/menu into a variable
- put the
lineOffset into a variable
- if the lineOffset variable is greater than 0; delete line (lineOffsetVariable) of (fieldMenuVariable)
- set the text of the field/menu to (fieldMenuVariable)
sorry but how to you set the lineOffset?
SyntaxlineOffset(lineToFind,stringToSearch[,linesToSkip])
what do they mean by lineToFind?
the other field?
Code: Select all
put selectedText of field "dbDrop" into dropDb
put lineOffset(dropDb,asd) into setline
if the lineOffset variable is greater than 0; delete line (setline) of field "existDB"
Re: deleting value of the same in other field or menu button
Posted: Fri Aug 03, 2012 8:27 am
by jmburnod
Hi pidobearBUSsb9q,
This script should work:
Code: Select all
put selectedText of field "dbDrop" into dropDb
put lineOffset(dropDb,asd) into setline
if setline <> 0 then delete line setline of field "existDB"
Best regards
Jean-Marc
Re: deleting value of the same in other field or menu button
Posted: Fri Aug 03, 2012 8:38 am
by pidobearBUSsb9q
jmburnod wrote:Hi pidobearBUSsb9q,
This script should work:
Code: Select all
put selectedText of field "dbDrop" into dropDb
put lineOffset[b](dropDb,asd[/b]) into setline
if setline <> 0 then delete line setline of field "existDB"
Best regards
Jean-Marc
hi
thanks for your help
but i didnt know what to put in for the bold part so i just placed asd in it sorry can you help by explaining what should be inside?
Re: deleting value of the same in other field or menu button
Posted: Fri Aug 03, 2012 9:05 am
by pidobearBUSsb9q
okay i understand already
Thanks guys!
cheers

Re: deleting value of the same in other field or menu button
Posted: Fri Aug 03, 2012 9:14 am
by pidobearBUSsb9q
How do i set the datagrid column names same as the database when i switch database to view?
can it be done?
Re: deleting value of the same in other field or menu button
Posted: Fri Aug 03, 2012 12:22 pm
by Klaus
pidobearBUSsb9q wrote:How do i set the datagrid column names same as the database when i switch database to view?
can it be done?
Yes, it can be done
You can set the names of the columns and also the label of the columns:
...
## Rename the internal naming:
set the dgProp["columns"] of group "Data Grid" to your_CR_separated_list_of_new_column_names
...
## Only change the display of the column headers:
set the dgProp["column labels"] of group "Data Grid" to your_CR_separated_list_of_new_column_LABELS
...
I strongly recommend that you download the manual for the data grid and work through it!
Get the PDF here:
http://lessons.runrev.com/m/datagrid
And of course these great stacks:
http://www.runrev.com/developers/lesson ... nferences/
Best
Klaus
Re: deleting value of the same in other field or menu button
Posted: Mon Aug 06, 2012 4:22 am
by pidobearBUSsb9q
Klaus wrote:pidobearBUSsb9q wrote:How do i set the datagrid column names same as the database when i switch database to view?
can it be done?
Yes, it can be done
You can set the names of the columns and also the label of the columns:
...
## Rename the internal naming:
set the dgProp["columns"] of group "Data Grid" to your_CR_separated_list_of_new_column_names
...
## Only change the display of the column headers:
set the dgProp["column labels"] of group "Data Grid" to your_CR_separated_list_of_new_column_LABELS
...
I strongly recommend that you download the manual for the data grid and work through it!
Get the PDF here:
http://lessons.runrev.com/m/datagrid
And of course these great stacks:
http://www.runrev.com/developers/lesson ... nferences/
Best
Klaus
Hi
thanks for helping
where to i put this (your_CR_separated_list_of_new_column_names)?
thanks for the reference.
will go through that.
Re: deleting value of the same in other field or menu button
Posted: Mon Aug 06, 2012 11:48 am
by Klaus
Hi pidobearBUSsb9q,
pidobearBUSsb9q wrote:...where to i put this (your_CR_separated_list_of_new_column_names)?
hmm, when neccessary
Maybe right before you display the data in your datagrid?
And please stop quoting the complete previous posting, that does not make any sense unless you answer
specail parts from the quoted posting directly, see above
Best
Klaus