suhas-mahajan
9th April 2007, 07:59
Hi Friends,
I am writting code for printing user data (ttaad2100m000) for from...to users. Here I have to add condition, if user not found in the range then company no. should display as 0 (zero). If I add ttaad200.comp=0 then its meaning will be tools company, How to make it NULL value?
regards,
-Suhas
mr_suleyman
9th April 2007, 08:31
Hi,
company number is integer field and primary key field. That'why you couldn't give null value. Try to define fixed number instead of null company.
That's all,
G.Luck!!!
suhas-mahajan
9th April 2007, 09:05
No...then what's the fixed no.?
regards,
-Suhas
mark_h
9th April 2007, 13:47
Are you talking about for a report? On the report you could always put this in the print expression ttaad200.comp>0 ? str$(ttaad200.comp) : " ". Just make it a string field. Or are you talking about something else.
suhas-mahajan
9th April 2007, 13:56
No...I cant make string field.
This is not only for printing but also actual updation in the table.
How to achieve this?
regards,
-Suhas
mark_h
9th April 2007, 14:28
Can you try assigning a dummy company number? For example if you live companies are 201 and 401, then assign 501. I am not sure what will happen when you do a convert to runtime on something like this.
mr_suleyman
9th April 2007, 16:46
I mean that marks said ...
suhas-mahajan
10th April 2007, 07:23
No...that's not appropriate solution for me. Admin will surprise How that company no. occurred and on what logic.
regards,
-Suhas
mr_suleyman
10th April 2007, 15:42
Sorry but I know many companies using this method.I think if it is for an aim and it is needed then Why don't you use that ?
I think there is a no solution you would like.
G.Luck !
george7a
10th April 2007, 16:02
Hi Friends,
I am writting code for printing user data (ttaad2100m000) for from...to users. Here I have to add condition, if user not found in the range then company no. should display as 0 (zero). If I add ttaad200.comp=0 then its meaning will be tools company, How to make it NULL value?
regards,
-Suhas
Hi,
I didn't understand your question 100%. If a user is not in range it shouldn't be printed at all, no?
Can you please explain again what is your final goal(s)?
- George
suhas-mahajan
11th April 2007, 09:39
Ok...here is in simpler way.
I am importing user and company from CSV file, if the company is not exist or not within Package Combination, it should import as a NULL (I can say) but BaaN is converting as a zero as default integer value but its meaning became 000 company.
I am curious, How you people resolved this kind of scenario? If I put 999, then also its surprising to see this value for the tester.
regards,
-Suhas
george7a
11th April 2007, 11:10
In the system I tried you must have a company number. You will have to put a number there. It is your choice to choose what number shall represent the null/default company. If you don't want to create a NULL company then you will have to put the right company for the user and you have to get it from another file/resource.