Hello again.
I have another question and wonder if someone can point me in the right direction.
I have built a quote generating application and when selections are made within my application a user is able to generate a 'sales proposal'.
I am now looking to implement a feature where if a user was to add information on a specific card to the end of the 14 card proposal then all they have to do is click a button. This is pretty straight forward but I am stuck when it comes to if a user wants to add more than 1 card to the end of 14 card proposal.
Any ideas on a simple script that copies info on 1 card to the end of a 14 card proposal? And obviously if more than 1 card needs to be copied it will check if page 15 has any info on there and if so then to copy to page 16 and so on.
Hope this makes sense.
Cheers
Dan
Copy a card to another
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Copy a card to another
Hi Dan,
What you want seems to be similar to
Best,
Mark
What you want seems to be similar to
Code: Select all
put fld "Original Text" of cd 1 into fld "Copied Text" of cd 16
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Copy a card to another
Thanks Mark
Yes that's right, however say if the user has already copied a card into card 16. How can I script it so that it will then be copied to card 17. And if card 17 has already had a card copied to it then into card 18 and so on?
Yes that's right, however say if the user has already copied a card into card 16. How can I script it so that it will then be copied to card 17. And if card 17 has already had a card copied to it then into card 18 and so on?
Re: Copy a card to another
I'm not sure, Dan, but perhaps you could check whether fields are empty:
Or you could always create a new card before copying:
Best,
Mark
Code: Select all
repeat with x = 1 to number of cards
if fld "Field to check" is empty then exit repeat
end repeat
put fld "Original Text" of cd 1 into fld "Copied Text" of cd x
Code: Select all
go last cd
create card
put fld "Original Text" of cd 1 into fld "Copied Text" of last cd
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Copy a card to another
Thats perfect Mark thank you - all sorted.
Your help was most appreciated!
Your help was most appreciated!