ShowIF or ValidIF

hi

I am designing an app for my exercise goals this year (Thank you, thank you)… I have over 500 sessions which are a mix of Types: Run/Swim/Bike/Yoga, they vary in Intensity: Hard/Intermediate/Easy, they also each have a Session Name: Leg Burrner/Chase the Bubbles etc and they all have a Warm-Up/MainSet/Cool Down and I want to send them via PDF for me to print.

I have a LIBRARY of them all with all of their corresponding columns.

I have set up the Type/Session Name/Intensity/Session Name with ValidIF dependent drop downs, but I want the Warm-Up/MainSet/Cool Down to auto-populate.

Whats the best way to auto populate these columns? The dependent drop down obviously hides the text until I select it.

You can autopopulate the columns by setting the initial value property to a LOOKUP() formula on your library table.

Thanks Jonathon.

Would that work if the previous fields were filtered by dependant drop downs?

Example dependent drop downs for Type/Session/Intensity/etc… then the WarmUp/Mainset/Cooldown columns would be initial value LookUp()?

Yes, as they will only actually “hold” one value at a time, unless they are EnumLists, which would require more work to use.

Yes, you could use Initial values to prefill these columns based on the previous ones. Users can still edit it to something else though. You could use a Initial value + a Valid If, if you want to prefill and allow user to edit, but only give them so many options.

1 Like

Thanks Dave.

I am struggling to get this to work:

Library has same columns (populated with the data) as Journal (Unpopulated)

I only fill in the journal so if I select the Type/Intensity/Demand/Session I am stuggling to think what I put in the Lookup() for it to show the WarmUp/Mainset/Cooldown…

Lookup(“Warm Up”,“Library”, “Warm Up”, “Warm Up”) ???

So, let me get this straight first.

You have a Library table and Journal table. Library table seems to be prefilled with data, but I’m going to guess that data isn’t added or deleted from there (for the most part). Journal is unpopulated and where you plan on adding entries. Both have the same column structure.

In Journal, you have a form where you fill in [Type], [Intensity], [Demand], and [Session]. Now for the part I’m less straight on.

For [WarmUp], [Mainset], and [Cooldown], do you want these to only be visible once the first are filled in? Or do you just want these to auto-populate? Or both?

For auto-populating:
LOOKUP([ColumnName], "Library", [MatchColumnInLibrary], [ColumnFromLibraryYouWant]

  • [ColumnName] should be either [Type], [Intensity], [Demand], or [Session].
  • [MatchColumnInLibrary] should be the same column. (since you said their identical)
  • [ColumnFromLibraryYouWant] should be either [WarmUp], [Mainset], or [Cooldown] depending on which column this whole expression going in.

If you want them to stay invisible until a value has been computed for these columns, for Show_If:
ISNOTBLANK([_THIS]) should work. Optionally, you can use CONTEXT("ViewType")<>"Form" to only hide the fields in the Form view.

I’m not sure what your values are supposed to be so, this is about as much help as I can provide at the moment.

And if you need to figure out those last three columns based on the combined entries of the first four, then we may need to switch to a SELECT(...) expression instead.

Thank you Bahbus, I think I may need to use the Select function. I was hoping to filter the sessions down and then select a Session, and then the rest of the fields Warm Up/Main Set/Cool Down would auto populate based on my selection.

Would a De-reference be better?

Better is relative. I like using dereferences when I can, but I won’t go out of my way to make a dereference available. So it all depends on how all your data looks, the connections between them, and how you want the app to function.

Plus, if those last three columns are dependant on the combination of all 4 of the previous columns, a Select will be easier (I think) than a dereference.

1 Like