Hi
I just had a look and upopup is part of ucomment so probably best not to go the dangerous root :-)
So, I would go with this:-
1. Create an xml export file of a component or all components
2. Cut out this part and paste it into notepad ++
<TABLE>
<DSC name="UXFIELD"
..
..
</TABLE>
3. Ctrl H - search and replace in notepad ++
a. Set search mode as regular expression
Find
b. ^</DAT>\r\n(<DAT name="FRM_WIDGETTYPE">EDITBOX</DAT>)
c. Replace
</DAT>\r\n<DAT name="UPOPUP">MYPOPUP</DAT>\r\n\1\r\n
4. Copy all of the new code ctrl-a, ctrl-c
5. Paste it back in the original position of the xml file
6. Save
7. import
8. see if it worked
------------------------------
Osman Shariff
------------------------------
Original Message:
Sent: 06-29-2022 08:15
From: Knut Dybendahl
Subject: Add a popup menu to every painted field
Hi Osman
Using direct SQL on UXFIELD could be 'dangerous'....
Remember, there are a number of control characters embedded in the extended part of the record....
for all the triggers, html options et al...
UCFIELD is an option - alas - you'll still have the same challenge as above.
Regards,
Knut
------------------------------
Knut Dybendahl
Original Message:
Sent: 06-29-2022 04:28
From: Osman Shariff
Subject: Add a popup menu to every painted field
My first approach would be to add manually the requirement to one field in one component, and check it has the desired effect.
Then do an xml export and see what has been generated.
Then use notepad ++ to change the desired text using regex; first with one component and then the lot.
Although, it would give the same results as doing direct sql on the uxfield table.
Both ways should definitely work.
Another thought is why not use ucfield instead. It will then be in place for all future new fields, it that is desirable ;-)
------------------------------
Osman Shariff
Original Message:
Sent: 06-27-2022 13:31
From: Knut Dybendahl
Subject: Add a popup menu to every painted field
HI Toni,
More of a brute force approach?
$ude --> export to XML
read exported XML file as a TXT file
do a $replace on the tag you want / need
save back to XML file
$udf --> import XML file.
Done
Regards,
Knut
------------------------------
Knut Dybendahl
Original Message:
Sent: 06-26-2022 04:52
From: Toni Davenport
Subject: Add a popup menu to every painted field
I'm trying to find an easy way of adding a popup menu to every painted field. I have tried this:
variables
vPosn
string vTemp
endvariables
clear/e "uxfield"
retrieve/e "uxfield"
setocc "uxfield",1
while($status > 0)
if(upopup = "") upopup.uxfield = "FLDRIGHT"
setocc "uxfield", $curocc(uxfield) + 1
endwhile
but it doesn't work, I've also tried to put the value in ucomment.uxfield directly in meta data but this didn't work either. Fields are not templated and although now using 10.3.02, it started life in uniface 5.
Any ideas please on how I can do this? Many thanks!
------------------------------
Toni Davenport
Uniface Community Edition Shared Account
US
------------------------------