Here is an example with ChatGPT3.
My prompt is:
I have an entity called MyEntity linked to the database. It has 2 fields which consists of the primary key (id1 and id2). And one field which is information (info) I want to retrieve all records linked to value value1 of key id1 and browse through all records and write as putmess the values of id2 and info.
The proposed code is:
variables
string value1, id2, info
endvariables
* Set the value for id1
value1 = "your_value1"
* Find all records with id1 = value1
find MyEntity with id1 = value1
* Start browsing through the records
loop
next MyEntity
if (status = 0) then
* Retrieve the values of id2 and info for the current record
id2 = MyEntity.id2
info = MyEntity.info
* Output the values using putmess
putmess "id2: " id2
putmess "info: " info
* Process the record as required
endif
else
* No more records found, exit the loop
exit
endif
endloop
------------------------------
Stephane Pfefer
Application Specialist
Darling
------------------------------
Original Message:
Sent: 07-07-2023 05:20
From: Stephane Pfefer
Subject: ChatGPT and Uniface
Hello,
I am getting help from ChatGPT for scripts in Python, HTML, Javascript or for complex SQL requests. It is incredibly efficient to create a script from a quick description of what I need.
I have tried it with Uniface but ChatGPT 3.5 is creating code that I don't recognise as Procscript. I could test quickly once with ChatGPT 4 and it looked better but I did not have the possibility to check whether the code was correct.
Has anyone already tried ChatGPT for Uniface ? What is your experience ?
And for Uniface members, have you tried to contact some AI companies in order to get their tool trained on Uniface ?
Thanks,
Stephane
------------------------------
Stephane Pfefer
Application Specialist
Darling
------------------------------