Ahmedo
July 17, 2014, 11:23am
1
Hi,
I have my own form and i have a datafield “AccountNum” with name property is “Identification_AccountNum” and i want to set a new value to this field by editing the first value he has
i have make this :
void clicked(){
str rslt;
super();
rslt=int2str(Gender.selection())+int2str(mthOfYr(BirthDate.dateValue()))+int2str(year(BirthDate.dateValue())) + Identification_AccountNum.text();
if(VendTable_VendNumSequence.text()==“CTIS”){
Identification_AccountNum.text(rslt);
}
element.close();
}
You described what you’re doing, but forgot to explain the problem you need help with.
Anyway, if the control is bound to a data source, you should set value to the buffer created for the data source, e.g. vendTable.AccountNum = rstl .
When we’re mentioning form data sources, look also at Tutorial: refresh, reread, research, executeQuery , otherwise you will likely have questions about it sooner or later.
Ahmedo
July 17, 2014, 1:42pm
3
Hi ,
thank for replay,I have solved the problem
Can you please explain the solution, so if somebody opens, he gets the answer too?
Ahmedo
July 17, 2014, 2:57pm
5
I have changed clicked method, the problem is that the field has been enter so i shoold add update query
void clicked()
{
str rslt;
VendTable VendTablee;
ttsBegin;
super();
rslt=int2str(Gender.selection())+int2str(mthOfYr(BirthDate.dateValue()))+
int2str(year(BirthDate.dateValue())) + Identification_AccountNum.text();
if(VendTable_VendNumSequence.text()==“bbbbbb” ){
while select forUpdate VendTablee
where VendTablee.AccountNum == Identification_AccountNum.text()
{
VendTablee.AccountNum = rslt;
VendTablee.update();
}
}
ttsCommit;
element.close();
}