Happy New Year ALL,
I am trying to create an invoice detail type scenario where I can add multiple lines of the same information to a form. The detail can have one to 5 detail lines. Can anyone suggest how I can do this? Ideally I would like to start off with one detail line where I would choose a product from a drop down list, enter the information such as cost, qty etc and then click "Enter another Line". Another detail line would be presented to the user and so on?
Many thanks
Nic
Dynamically adding fields to a form
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Dynamically adding fields to a form
the most simple method i know is this
check the dictionary with keyword "add"
Code: Select all
put "aa" into line 1 of fld 1
Re: Dynamically adding fields to a form
Hi vedus,
-----------------------------------------------------------------------------------------------
Add:
Adds a number to a container and places the resulting value in the container.
...
----------------------------------------------------------------------------------------------
Best
Klaus
which you did not obviouslyvedus wrote:check the dictionary with keyword "add"

-----------------------------------------------------------------------------------------------
Add:
Adds a number to a container and places the resulting value in the container.
...
----------------------------------------------------------------------------------------------
Best
Klaus
Re: Dynamically adding fields to a form
hehe hi klausKlaus wrote:Hi vedus,which you did not obviouslyvedus wrote:check the dictionary with keyword "add"![]()
-----------------------------------------------------------------------------------------------
Add:
Adds a number to a container and places the resulting value in the container.
...
----------------------------------------------------------------------------------------------
Best
Klaus

well some times i forget some lines

btw the question from the friend above is add field in the thread but the post is for lines

so here is what i use for field creation with code
Code: Select all
on mouseUp
// Make a dialog
ask "please enter the name of field" with "ok" and "cancel"
//get the result
if it is not empty then
//put the result into array
put it into t1
//create the field
create field "fld1"
//put the field in the card
set the rectangle of fld "fld1" to 80,100,200,200
//set the name into the name you get from the ask dialog
set the name of fld "fld1" to t1
//if is cancel exit
else
exit mouseUp
end if
end mouseUp