Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Related Items not showing in Portal after import.


benjamid

Recommended Posts

Hi,

 

I have a pretty large db that I've created and all works well. I was pretty sceptical of FMP prior to this project, but I've grown to respect it. smiley-smile

 

I'm currently at the stage where I'm importing/massaging our old data into the new db and I'm having problems getting the data to display the imported records immediately after the import. I know the relationships are correct because as soon as I create a new record via the portal all of the imported records then display, it's almost like I need to refresh the indexes?

 

Any thoughts?

Link to comment
Share on other sites

Make sure the foreign key is correct.

 

My portal simply shows all related records based upon userID. I know that I'm getting the correct IDs because as once I make the new record via the portal, all the records that I import magically appear. Almost like it needed some sort of a refresh.

Link to comment
Share on other sites

None of my keys are global. Would it help if I posted a shell version up here?

 

You will have to upgrade your membership to be able to do so. But the answer is yes, along with a sample of your data (that you are importing).

 

But let me ask this first....

 

In your OLD database, how is the data related? And are you using the exact same key fields and keys in the imported (Filemaker) data?

 

Edit: I would make sure the data is displayed from the import only BEFORE adding any data via the portal.

Link to comment
Share on other sites

In your OLD database, how is the data related? And are you using the exact same key fields and keys in the imported (Filemaker) data?

 

 

The old DB isn't Filmaker. It uses SSN as its relational ID. We want to do away with this, so I have created an excel macro that does a lookup and replaces the SSN with our new UserID. Each excel spreadsheet is then imported into its respective FMP table. I know that the macro is working correctly(replacing the SSN with the correct ID, because the data displays in the portal - but only after adding a new record)

 

Edit: I would make sure the data is displayed from the import only BEFORE adding any data via the portal.

 

Not sure I understand what you mean by this... I'm not getting any import errors, and if I look at the table to which I'm importing the data, it is populated.

 

My users will ONLY be able to create/modify records via the portal in this instance.

Link to comment
Share on other sites

I did the exact same thing with a patient database. I would strongly suggest that you use the SSN as the keys for the imported data (primary and foreign) and then write a script in FM to reassign numerical keys.

 

You should be able to see your related data WITHOUT adding a new portal record. Something is not adding up correctly... (euphemistically speaking)

Link to comment
Share on other sites

Thanks for all your help! I'm going to give that a try. Any advice on the script that will assign new keys to the records?

 

Also, one little tidbit... Once a new record has been added to one of the portals(there are multiple) then the data displays in all of them... Now I'm beginning to think that it has to do with my primary key.

Link to comment
Share on other sites

Edit note: My indents for script accuracy were not accepted. I will use a "*" to mean indent

 

 

 

1. Assign your primary key with this script:

 

Go to layout (MainTable)

Sort records (if you want by one or more fields of your choice)

Set variable ($Count;1)

Go to record (first)

Loop

**Set field (MainTable::NewKeyField;$Count)

**Go to record (next) (and check exit after last)

**Set variable ($Count;$Count+1)

End Loop

 

 

2. For your first related field - still using SSN as the relationship.

Place a portal (only one portal!!!) on your main layout. On the portal attributes be sure to check the box to add a vertical scroll bar (very important).

 

2nd script (to assign the foreign keys)

 

Go to layout (MainTable) -- not really necessary but I do it anyway

Go to record (first)

Loop

**Set variable ($fKey; MainTable::NewKeyField)

**Go to portal row (first)

**Loop

****Set field (FirstForeignTable::fKeyField;$fKey)

****Go to portal row (next; exit after last)

**End loop

**Go to record (next; exit after last)

End loop

 

 

3. Repeat 2nd script for each additional "foreign" table to be related.

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

Terms of Use