FirstValidRepValue
Returns the first valid value from a list of values in a repeating field
Be the first to rate this function Log in to vote
| simes - Show more from this author |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
If you have values in a repeating field and you need to get the first valid value but ignore any empty repetitions, the GetValue function can do this, FirstValidValue wraps this into a custom function.
Comments
| Richard DeShong, Logic Tools Oct 16, 2025 |
||
| Hello simes, sorry I am bit confused by the sample input, is this supposed to represent a field with 4 repetitions? If so, is "R1+0" a typo? Also, if it does represent 4 repetitions, why would List() not include the first two repetitions, since they have a value of zero. I get that if they were empty, then List() would not include them. I guess, more specifically, what do you consider "valid". |
||
| simes Oct 17, 2025 |
||
| Sorry, typo, should have been R1=0. Empty = NotValid From what I can see GetValue returns Valid if any data has been entered into a rep field with a carriage return (which is added via 'List'). So NotValid if empty, but Valid if "0" or any other data is entered. Perhaps I should correct this to: R1=empty, R2=empty, R3="1", R4="2". I am using this on manual entry fields, not tried calculated fields. |
||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.