![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
This is pretty basic, and I've alredy solved it, but I wonder if things are even simpler. In FMP 10, I need to find you whether the present record has a specific keyword assigned, i.e. if there's a child record with a specific foreign key (a different table's key, I'm looking into a join table here). I could create a calculated field that holds this key and use it in a relationship, then I could use IsValid. Without the additional field and relation, I use this: FilterElements ( List ( ChildTable::ForeignKey ) ; // List of all foreign keys "44" ) // the hard coded value I'm looking for = "44¶" // See if this returns right or false (mind the return) Apart from the hard coded value, which could of course be mended - is this the best way to find out? |
#3
| |||
| |||
|
|
This is pretty basic, and I've alredy solved it, but I wonder if things are even simpler. In FMP 10, I need to find you whether the present record has a specific keyword assigned, i.e. if there's a child record with a specific foreign key (a different table's key, I'm looking into a join table here). I could create a calculated field that holds this key and use it in a relationship, then I could use IsValid. Without the additional field and relation, I use this: FilterElements ( List ( ChildTable::ForeignKey ) ; // List of all foreign keys "44" ) // the hard coded value I'm looking for = "44¶" // See if this returns right or false (mind the return) Apart from the hard coded value, which could of course be mended - is this the best way to find out? -- http://clk.ch |
#4
| |||
| |||
|
|
What if the value you are looking for comes last in the List? I seem to remember it wouldn't be followed by a pilcrow and the calc would return a false. |
#5
| |||
| |||
|
|
This is pretty basic, and I've alredy solved it, but I wonder if things are even simpler. In FMP 10, I need to find you whether the present record has a specific keyword assigned, i.e. if there's a child record with a specific foreign key (a different table's key, I'm looking into a join table here). I could create a calculated field that holds this key and use it in a relationship, then I could use IsValid. Without the additional field and relation, I use this: FilterElements ( List ( ChildTable::ForeignKey ) ; // List of all foreign keys "44" ) // the hard coded value I'm looking for = "44¶" // See if this returns right or false (mind the return) Apart from the hard coded value, which could of course be mended - is this the best way to find out? |
![]() |
| Thread Tools | |
| Display Modes | |
| |