Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Jane Raymond

#1
Nomads / Re: Sort On Header Click / Row Height
June 18, 2024, 09:38:28 AM
Further on using REC(_MWR_IOL$), the result could contain some color mnemonics and/or additional fields, so for the next release I've added a special QUERY_ROW$ variable that contains just the current contents of a row with the mnemonics stripped. It can be used in selection criteria or as a return value.
#2
Nomads / Re: Sort On Header Click / Row Height
June 07, 2024, 02:30:57 PM
Got it.
Take your querylist definition and change the Filter. Remove the Prefix settings and instead create a Test in the Selection Logic, something like:


Test:
YOURVAR$="" OR POS(UCS(YOURVAR$)=UCS(REC(_MWR_IOL$)))>0


This test will print the entire list if YOURVAR is blank, and if it's not it will look for the value in the data for the row which is found in REC(_MWR_IOL$).


REC(_MWR_IOL$) is somewhat esoteric, but looks like a value that would be useful for tests like this, so I'll create a new query variable containing its value for the next release.
#3
Nomads / Re: Sort On Header Click / Row Height
June 07, 2024, 10:53:33 AM
If you just want to display the records whose keys start with the value of the multiline, I have an alternate way to do this that doesn't require any coding. It involves using the smart control feature.

       
  • First, create a querylist with the fields you want in the report view or grid control you want to load. Add a filter where you add a Prefix based on your key (Primary Key or 'Sort By' Key), where the Prefix is an Expression that is the name of the multiline that has the value to be matched. (Side note - due to my key def I had to UCS() this value for it to work.)
  • Second, make your control 'Smart'. In the Attributes properties, click the Smart Load button, check Use Smart Load Logic and select the querylist you just created as the Panel. Under Trigger Variables and Controls, add the multiline control to Selected Triggers. Click OK and you're done.
  • Disable your current program logic on the multiline that hides your rows, as this will not be needed.
  • Test the panel. When you enter a value in your multiline, the list should reload with just the records that match and the columns will be sortable.
#4
Language / Re: Easiest way to create an XML file
May 31, 2024, 01:30:27 PM
Yes, there is way to do this if you're using PxPlus 2024, released last week.


Create a query to define the file(s) and fields. Then you can use the query definition in conjunction with the new *tools/qryexport utility to generate a Microsoft XML file that can be used to populate a spreadsheet. (It can also generate comma-separated (.csv), tab-delimited (.txt) and symbolic link (.slk) files.


Call "*tools/qryexport",queryName$,queryLib$,exportfile$[,queryopts$,show_flg$]


Here's more info on all the options:
https://manual.pvxplus.com/page/utilities/qryexport.htm
#5
Nomads / Re: Library Query
May 30, 2024, 08:46:22 AM
Mike,
Sorry I confused you by using %C$. The variable could have been anything.
I am happy that you got it all working.

#6
Nomads / Re: Library Query
May 29, 2024, 09:38:26 AM
Mike,
To try to duplicate your situation I did the following:
   Created a file (smnfile01) and duplicated it in a second file (smnfile02), then changed some of the records in the second file so would have different data.
   Set %c$="01"
   Created a generic data dictionary entry (Generic sales person) using the expression "smnfile"+%c$ as my physical file and updated the file.
   Created a query using Fixed 'Generic sales person' as my physical file name. Added some fields and saved it.
   Ran the query and it showed the data from smnfile01. Correct.
   Set %c$="02"
   Ran the query and it showed the data from smnfile02. Correct.
   Tried changing the query so the physical file name was Expression "smnfile"+%c$
   Ran the query setting %c$="01" and %c$="02" and the both showed the correct data.

What you did and what I did look very similar, so I don't know why yours is not working unless the value of FID(0) is not what you're expecting.
#7
Nomads / Re: Library Query
May 28, 2024, 08:39:57 AM
You want to create a query which uses a file whose name changes. The Physical File used by the query can be an expression set to the value of the current file name. It looks like the issue is setting that file name to a unique value that can be evaluated by the query.

#8
Programming / Re: Copy Data Definitions
May 27, 2024, 03:28:00 PM
I wouldn't recommend that approach as there is special logic for assigning the external keys for the ddf file.
#9
Programming / Re: Copy Data Definitions
May 27, 2024, 08:32:44 AM
In the data dictionary, could you change the physical file from 'C1ARCUST' to an expression like "C"+%COMPANY$+"ARCUST"? Then if you set %COMPANY$ to "1" or "2" or whatever you can use the same data dictionary definition for both files.
#10
Nomads / Re: Library Query
May 27, 2024, 08:18:40 AM
There are two possibilities:

       
  • In the Data Dictionary, use the expression GLWK+FID(0)+TCB(13) as your physical file name. Then, whenever a new  file is created, be sure to embed the dictionary. When the query runs, it will evaluate the file name and open it.
  • In the query definition, use the expression as the File/Table. If the dictionary is embedded in the file the expression evaluates to, it will use it.
#11
If there are other data files you might want to compare, there is a tool to convert our data files to text files:
CALL "*tools/ConvertData;Binary_to_Text", binPath$, txtPath$ [, password$]
This works great if the file you want to convert has an embedded dictionary.
#12
A few things to consider:


It might be better to use the %nomads'lib_iol1$, as it uses all string fields which might be easier to use:
IOLIST OBJ_NME$,OBJ_C$,OBJ_L$,OBJ_W$,OBJ_H$,OBJ_TYPE$,OBJ_TXT$,OBJ_VAL$,OBJ_TAB,OBJ_DEF$,OBJ_DSP$,OBJ_FCS$,OBJ_SEL$,OBJ_MSG$,OBJ_HLP$,OBJ_ATTR$,OBJ_IDX$,OBJ_HOTKEY$,OBJ_QRY$,OBJ_SEC$,OBJ_STS$,OBJ_GRP$,OBJ_NULL$,OBJ_TAG$,OBJ_TBL$,OBJ_INP$,OBJ_OUT$,OBJ_VALID$,OBJ_CLASS$,OBJ_TIP$,OBJ_ORIG$,OBJ_FONT$,OBJ_COLOR$,OBJ_LISTBOX_TYPE$,OBJ_SEP$,OBJ_SCRATCH$,OBJ_POPUP$,OBJ_SIZING$,OBJ_LOGIC1$,OBJ_LOGIC2$,OBJ_POPUP_LOGIC$,OBJ_QRY_BITMAP$,OBJ_QRY_WIDTH,OBJ_QRY_TIP$,OBJ_QRY_ATTR$,OBJ_EXTENSION$,OBJ_DEMAND$,OBJ_DEMAND_LOGIC$,OBJ_BACKGROUND_LOGIC$,OBJ_PERSISTENCE$,OBJ_NOTES$,OBJ_TBL_LEN,OBJ_TVLINE_COLOR$,OBJ_AUTOSZ_WIDTH$,OBJ_AUTOSZ_HEIGHT$,OBJ_AUTOMATION_TEXT$,OBJ_HILIGHT_COLORS$,OBJ_PROPS$,OBJ_VISUAL_CLASS$,OBJ_INOMADS_CLASS$

There is a conversion program used by svn to convert an individual panel to a text file. (Attached is a sample columnwidth.txt). You could possibly take the program (*plus/proj/pxpnl) and alter it output to a single text file for all the panels.
#13
Nomads / Re: CHART Legends font/size
March 04, 2024, 09:37:12 AM
Jean,
I'll start by recommending you don't use the Native charts, as you can see in your example, you can't see all the values in 3D. You can control the values in the dataset legend on the left using the Minimum and Maximum settings, but don't really have any control over the font sizes of the legends in the Native chart.


I recommend using the Plus chart. Here is an example of a 3D Column chart using an Arial font, Regular size.
#14
This will depend on what you plan to do. If the dictionary files are updated to the current version, but you don't change any definitions, then there is no issue using them with previous versions.
If you do change some definitions, it will depend on the fields that you change. For example, the ddf file has added a FLAGS$ field to the end of the iolist, and the dde file has added an ORIGINATOR$ and ELEMENTTIP$ field to the end of the iolist. If you update a file definition in the current version using these fields, then modify the file again in the old version, you may lose the values in these fields.
#15
Programming / Re: Can create a Browse Query
March 04, 2024, 08:28:27 AM
In the Query Header Definition you can specify a library and panel to invoke to maintain the file on the Interfaces tab. So if you have a maintenance panel for the file, specify it here, and when the query runs a button will appear on the toolbar (or an item on the menu depending on the query view) that will allow you to edit the file using your maintenance panel.