Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Value list based on two related tables?

Featured Replies

I'd like to create a value list for a popup that displays values from the combination of two related tables, not just one. Any ideas on how to go about this?

Matt

See attachment.

T1.zip

See attachment.

Carefull - carefull a calc containing ValueListItems( is bound to be unstored in order to reflect changes. But Making it value source to a valuelist does it index/store/freeze much more than you wish for!!!!

This is why I change the popup into a "Choose from List" in Applescript


set aVar to second item of cells of table 1

set oldDelimiters to AppleScript's text item delimiters

set AppleScript's text item delimiters to return

choose from list (text items of aVar)

if result not is false then

	set cell "theReciverField" to result

end if

set AppleScript's text item delimiters to oldDelimiters

--sd

  • Author

aaa,

My tables are related a little differently. Actually I have one table with two additional related tables using match fields for a common ID number. Your solution works fine, with a little rearrangment as shown in the attachment. In this example fields from two related tables are combined to give the value list for a field in a third table.

Thanks again!

Your solution works fine, with a little rearrangment as shown in the attachment. In this example fields from two related tables are combined to give the value list for a field in a third table.

I'm afraid not, try to add an significant different entry in one of you tables ...and watch it mising from the popuplist. There is no point in dynamic valulists if they won't freshen and reflect changes ...if it isn't a problem would I hardwire one single VL instead of defining 3 of them.

--sd

  • Author

Hmm. Maybe I'm missing something here. I've deleted the superfluous fields to make it clear where the data entry is supposed to go.... and it refreshes instantly for me. I must admit, though, its not always clear to me when it is better to index or not index a field.

P.S. I've removed the attachment here and added it as a .zip file to the Tips forum.

I have not *.sit archivator. Therefore i can not read your attachment.Can you attach in .zip format.

Thats a very clever way of using the bidirectionality of relations, that I haven't thought of yet... BigThumbUp.gif

I played along with it, and it seems like you can make an arbitrary table and relate it with the cartesian product, and the just Ignore the warning about the indexing matter ... wich reminds me of the findings that Kevin Frank and Debi Fuchs once made on relations with globals as keyfields in both ends.

Actually do I find you idea, so good that you ought to convert it to a tipfile! But it could be daft ignorance on my behalf??

--sd

This is very clever indeed. Any thoughts on how I may be able to omitt values from value list entirely, that appear in both tables? Essentially, value list used in table 2 will use values from table 1 and omit all values that allready exist in table 2.

  • Author

Hey aaa,

Thanks for helping solve this dilemma. As suggested I've added this to the tips forum. You can find it at this link.

Cheers,

MF

P.S. Stuffit expander is free.

Hi MF,

Stuffit expander is free.

While this is true, for some reason our friends with widows operating systems have problems with .sit format, even with free Stuffit Expander.

I found that it saves me time if I just zip everything in the first place.

HTH

Lee cool.gif

I little changed your solution and see what i got. It is really good idea.

T1copy.zip

  • Author

Yes, changing the one or both of the value lists for the individual fields to "include all records" is another option which might be widely applicable.

In the attachment to the Tips post I also changed the List_of-all field definition to include the Get(FileName) function in place of "T1 copy" to allow the user to change the name of the file.

  • Author

Any thoughts on how I may be able to omitt values from value list entirely, that appear in both tables? Essentially, value list used in table 2 will use values from table 1 and omit all values that allready exist in table 2.

You could apply the FilterValues function to find the intersection between two different value lists. Unfortunately this does not omit items of one value list from a second, as you requested. Attached is the previous example reworked to include of a Popup which include the union of to fields as well as a second Popup which is the intersection of the two fields. In these examples the "Include all values" option was chosen in the VL1 and VL2 value lists so the items are not confined to the current record.

IntersectVL.zip

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.