Thanks All for the replies.
As suggested by few, I will go through the natural documentation again.
As you said, I won’t know the potential format values. So that’s the difficult part
Thanks for code
Our project is already using the tool created ( Which has the basic functionality of displaying the fields). So just thought if I cud extend it to have Update utility.
I thought explaining about the tool will confuse everyone and hence just gave my requirement, which really didn’t help
Below is the tool I created for accesing database fields, an year ago. I just released the initial version then and hence using this tool we can only display the fields. I attached the basic screenshot.
The logic is to create below script dynamically using RUN.
“Read the database, Accept/reject criteria and display the fields”.
I used a default of A40 for all display fields. Since I used a display, the field is displayed in correct format and no issues at all.
And then now I am thinking of creating the next version using which I can update the selected fields from the display.
If you see the attachment 2 (Update), I will first display the value of a field in modifiable map fields (If you see the attachment - A030299969, D, CD)and then allow to modify over it.
So I created few map fields UPDATE-1, UPDATE-2…
If +I (Defined as A40) consists of the field name #PRICE. &I consists of the value 10.35. (+I is used for passing field name to the dynamic program. &I while displaying)
In the Update module first we move &I to Update-1 (The fields Update-1, Update 2… are defined as A40 since I won’t be able to guess the format of the database field format). This will display the field value in the Update screen.
The problem occurs when I move Update-1 (A40) ( which consists of 10.35) to the real database field PRICE (N2.2) for updating.
Update-1 can be anything. Date, Time, N3.4, N10 …anything. So I don’t see a way how this can be generalized, because using the tool we can read all the database files and respective fields. We can’t guess the format of the field that is selected.
Just thought of giving you more details. I will read some documentation and see what can be done. May be with this design Update may not be possible I guess.