Set Property

I’m glad you know the difference - so, when you describe a problem, please, try to not confuse terms. Maybe you have a problem with English, which maybe isn’t your natural language, as it’s not mine. If so, we both need to make an effort. [:)]

About your problem, I would like to help, but I’m not sure which help you need - I think you know how to get the the default data from your Estimation Template Table, through the proper key (I didn’t really understand what you said about the key structure, but it doesn’t matter).

Once you have done that, you just have to take the value in the field corresponding to the requested column and put it in the corresponding field in the current record and update the form.

Which part of the above said process is giving you trouble?

hi anna…gud mgm [:)]

see these codes

IF CONFIRM(Text50000) THEN BEGIN
IF lUnitWise.GET(“Entry No”) THEN BEGIN
IF (“gColm No” IN [“gColm No”:: one]) THEN BEGIN
lUnitWise.“Conceptual Design(CD)” := gEsttemp.“Conceptual Design(CD)”;

END;
END;
END;

Does this make sense to you? this is how i want the codes to work…but this codes as it is isnt working! but the result should be as i have given in it…

i have first got the entry no of the field [ for this i have kept an textbox in the bottom of my form and then mapped this text box to the entry no field in the table, but the PROBLEM 'm facing is how i will use this entry no text box in my codes…here i have used the entryNo which is in my table, but i want to use the one in my form which i have kept…Make sense? ]…

Next i have said if my ColmNo is one(i have kept it has option field) then change the rec’s value to the value in my Esttemp table…

but this snt working dear…can you find the error 'm making?

Thanks [:)]

Hi Shona,

The example code from the help on FIELDNO should go a long way to solving this:

CASE CurrentFieldNo OF
Customer.FIELDNO(“No.”): …
Customer.FIELDNO(Name): …
Customer.FIELDNO(Address): …
ELSE …
END;

Sorry to ask again…but how?

Hi Shona,

I am not going to write the code for you but I will help if you make the effort.

What will work is:

  1. Create a form off the virtual table “Field” and filter down to the table and fields you need

  2. Use this new form to look the field number of the field the user wants to update - write the code in the onlookup trigger

  3. Use the case statement to determine which field to update.

You could also solve with RECORDREF and FIELDREF but I think this is too advanced for the stage you are at.

Shona,

I apologize for my too simple way of thinking, but… no, nothing in your code makes sense to me! [^o)]

“Entry No.” is the key field of the table that you call IUnitWise, which is - I suppose - also the source table of the form, so why do you need a further textbox linked to this field? When the focus is on the line # 8, your Rec variable holds all the fields of line 8.

Ok, that’s a minor glitch, it does no harm.

I asked once what’s the key of the template table, you answered something like “Entry No.”, “No.”… which means nothing to me, they are just field names. I was trying to understand the relation between the table source of your form and the template table - I don’t think they are related through record numbers.

To restore in your table the default values the first thing you need to do is to retrieve the right record in the template table exactly as you did, to change the color (I’d thought that, after so much pain, you had it stamped in your mind). I don’t see this operation in your code. Where is it?

What’s this mess of using an option? Why? You assigned (in your mind) a number to each column, ok. Now you just need decode that number: I would do something like this (actually I would do something totally different, but it’s your project):

CASE “gColm No” OF
1: lUnitWise.“Conceptual Design(CD)” := gEsttemp.“Conceptual Design(CD)”;
2: lUnitWise.“Whatever you assigned to column no. 2” := gEsttemp.“Whatever you assigned to column no. 2”
3: …
END;

Don’t forget to update the form after you are done.

hi anna,

i kept the colmNo as option field thinking that i could some how assign the fields to it and then manipulate, obviously i thought wrong.

And the unitwiseEstimation table takes values from the estimationtemp table on the selection of Complexity field(which is an option)

the key for the est Temp Table is No…

As for color…(maybe i wrongly assumed) that when i revert back the values to my Est Temp Table values, the color too will change since the color in the est temp table is black…

And My clients wanted me to keep 2 textbox , 1 for line no and another for colmNo…So i kept an textbox as lineNo and mapped it to entry no.

And this code doesnt provide the solution…i updated my form!

thanks [:)]

hi dave…

i thought of creating different forms to accomadate my requirements earlier…but the users dont want me to create another form…said i should filter this same form and produce the result.

but will try your way and let you know

hi…

i know the virtual table id for field is 2000000041…but i dont have table in that id in my cronus!..is it normal?

oh but i found it when i just tryed typing the Name field…thanks