CONDITIONS FOR MAKING A BUTTON SHOW
I want a button to appear selectively by using "Display field only, if". The field is in a Media record, attached to a Leader record (1 leader connects to n media). My condition is that a certain image field contained in the Leader record contains an image (isn't blank). How do I script that...? TIA.
12 replies
-
Sorry, addendum. The image that appears in the Leader record is actually in a function field, not an image field, with the image called up from a separate Image record.
-
You could do this simply with the following in the Display field only if (for the button):
Leader.'Image Formula'
Where 'Image Formula is what you refer to as the "function field" in the Leader table.
Hope this helps?
-
That response was actually from me (Julian) - I was logged in as a test user...
-
Thanks, Julian. Brilliant - that's really simple. What would the script be if I wanted to specify the field as "blank" rather than "not blank"?
-
Hi David - just put not in front of it:
not Leader.'Image Formula'
-
Thanks, Julian!
-
Sorry, one more! What script on a button in a Media record will open the associated Leader record? I have:
let myID := LEADER;
closeRecord();
openRecord(record(LEADER,number(myID)))... but sometimes this seems to close the Media slide-in without loading the Leader slide-in, and I'm not sure why.
-
Hi
Assuming your media record is linked to the Leader record using a field Leader then:
popupRecord(Leader)
This will open the Leader record without closing the Media record - as a slide in as you call it.
However, do you need to do this - simply clicing on the Leader field will do the same thing.
Julian
-
OK, thanks, Julian. Yes, the short cut is fine for me, but my editing team needs something simple and obvious!
-
Julian, is there a condition that tracks if a record is already open? "Do not display this buton [in Media record] if the Leader record it opens is already open?" Otherwise my editors are going to get into a muddle piling up records on top of one another.
-
You could just use:
openRecord(Leader)
this will open the Leader record (and go to the Leader table). The downside is that it will close the Media record.
-
OK, thanks, Julian.
Content aside
- 5 yrs agoLast active
- 12Replies
- 2620Views