Page 1 of 1

Place Query and/or report

Posted: 15 Feb 2023 13:15
by kevync1985
Good Morning,

Still relatively new to FH7 (and FH). I am looking for a query or report to output (preferably).
I want a query view or report that will reverse order output by position.
Similar to the Tools > Working with Data > Places > Place List (with reverse order),
However the report only generates 2 cols --- one for name and second of # used.
If there is a query to view places "split" by position that would be create, but it would need to be in reverse order for my purposes so Country is first. Thanks! Kevin

Re: Place Query and/or report

Posted: 15 Feb 2023 13:54
by tatewise
Yes, a Place type of Query with the =TextPart(...) function can do that.

When creating a new custom Query ensure its type is set to Place so it examines Place records.
Then define Columns for each Place part in reverse order and sorted Ascending.
e.g.
Heading: Last
Expression: =TextPart(%_PLAC.TEXT%,-1,1,STD)
Sort: Ascending

Heading: 2nd Last
Expression: =TextPart(%_PLAC.TEXT%,-2,1,STD)
Sort: Ascending

Heading: 3rd Last
Expression: =TextPart(%_PLAC.TEXT%,-3,1,STD)
Sort: Ascending

Heading: 4th Last
Expression: =TextPart(%_PLAC.TEXT%,-4,1,STD)
Sort: Ascending
and so on...

See FHUG Knowledge Base An Overview of Queries.

Re: Place Query and/or report

Posted: 15 Feb 2023 14:17
by kevync1985
Perfect! thank you that is what I was looking for -- similar to SQL I have seen.

Re: Place Query and/or report

Posted: 16 Feb 2023 11:25
by jimlad68
Lots of PLACe queries for comma separated parts attached. They are geared up for my Biggest 1st PLACe order e.g. Country, state, County, Town, District, etc, but will give many ideas for organising. The *CHECK* queries are to try and keep my PLACes in strict comma separated order.