Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3310 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I am building a digital asset manager in FM 13 for Windows. I am having problems displaying filtered data in a portal. I have series of scripts that bulk imports the file names & folder structure and creates a collapsible hierarchical keyword structure that is comparable to the folder structure. It creates all the joins between keywords and assets. 

Example:
C:\Automobiles\Cars\Fiat\Model1.pdf

results in
C:
---Automobiles
-----Cars
---------Fiat  

When "Fiat" is clicked, all assets associated with this path are shown in a second "Asset" portal using the filter:

not IsEmpty ( FilterValues (  Data for Keywords::ID ; global::gCurrent Keyword ) )

This portion works fine. User added keywords are intended to appear in the same keyword portal using the structure of:

c: (imported example above)
Author
---A
---B
etc
Series
---A
---B
....
---F
------User Added keyword (ie Fiat)

A script inserts the user created keyword alphabetically into the keyword hierarchy and creates the join table record. This is where the problem occurs. Clicking on the user keyword in the keyword portal returns an empty asset portal. I have double checked all PK values in the asset and keyword tables against the matching join table records and they are correct.  I have also manually deleted and inserted working and no-working join link records to see if there is an issue with how the joins are created (manually vs script) without affect.

Any suggestions on why this may be occurring would be greatly appreciated.

Thank you

db2.jpg

Posted (edited)

I think you are making it too abstract for us to follow.  Give us an example of real data and what you would expect to see.

 

Also: of those TOs in your picture: where is the layout based on?  Make sure to include all data in left and right fields of the relationship.  Judging by the picture you have all relationships from "content" set up as cartesians?  That can't be right?

It may be a better idea to name your TOs for that they represent as entities.  "content", "keyword join, etc don't bring much to the table in ways of trying to wrap your head about what you are looking at.

Edited by Wim Decorte
  • Like 1
Posted (edited)

Thank you for you assistance. I am very much a novice with FM and I am open to better ways of doing things including names and processes. 

I have included an image of main layout showing some test data that will hopefully aid in clarifying my issue. From the picture above, the main layout is based on the CONTENT layout. I used cartesian joins because the portal filtering is done based on a global field value and not a relationship based on a current record.

Looking at the layout image, the left portal is a collapsible hierarchy. Clicking the arrows expands or collapses the keyword list. Clicking on the name of a keyword populates the global field gCurrent Keyword which is used to filter the asset portal (layout image, left portal). The first three records in the keyword portal are created by using scripts to capture the contents of all directories and stores filenames in table Main Library (from above image), recreates file structure, and the joins. An SQL search populates gCurrent Keyword so that if a keyword parent is clicked on, all associated children are shown.

This portion works fine.

The problem comes when I try to add additional keywords to the list. The layout image shows the pk (all pk and joins fields are text fields) for each table in yellow. The join table is also shown. So looking at the layout, if the keyword New Folder 1 is clicked then the record file 1.txt is correctly displayed. However, the keyword bob is also associated the record file 1.txt. The join table appears to be correct but when the keyword bob is clicked the field gCurrent Keyword is correctly populated but the portal is empty. 

Thanks again for your assistance.

 

db layout.jpg

Edited by Lyinggod
Posted (edited)

I have made some small progress on this. It seems that the issue relates to having multiple matches in the join table. If I break the join related to _Asset_pk 7335 and _Keyword_pk 0004878 then the next join (only) functions, in this case relating to the keyword bob.  I am still not sure why this is the case or how to resolve it as I need to be able to apply multiple keywords to the same asset.

 

Edited by Lyinggod
Posted

I have finally resolved this. The portal filter should have included the LIST command as follows:

not IsEmpty ( FilterValues (  List ( Data for Keywords::ID ) ; global::gCurrent Keyword ) )

Thank you for everyones help

This topic is 3310 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.