Rich S Posted September 16, 2019 Posted September 16, 2019 Greets, all: I want to use a Conditional Formatting calc to apply to a set of (required) fields in a portal so that empty ones are highlighted in the first row of a portal, only. (The logic is that the portal must contain at least one record, so only first row needs to be used as a flag to users.) I tried using Get ( ActivePortalRowNumber ) in the calc but the problem is that unless a portal row is active it doesn't have row number. Any ideas? TIA for your help!
comment Posted September 16, 2019 Posted September 16, 2019 Wouldn't it make more sense to highlight the required fields in the first empty portal row, where the next entry will take place? Anyway, highlighting the first row is more complicated than it might seem. One way is to define an unstored calculation field in the child table as = Get ( RecordNumber ) then use: Child::cRecordNumber = 1 as the formatting condition. Alternatively, you could use something like: Child::ChildID = GetValue ( List ( Child::ChildID ) ; 1 ) but this assumes your portal does not have an overriding sort order. Another option is to make the fields transparent and place a text object containing the record number symbol behind them. Then format the text object to highlight when value is equal to 1.
Rich S Posted September 17, 2019 Author Posted September 17, 2019 *snip* "Wouldn't it make more sense to highlight the required fields in the first empty portal row, where the next entry will take place?" Yes and no. The portal is required to have at least one record in it, hence the yellow field fill to alert the user that "Hey, you need to put enter at least one record here." What I figure would happen if a subsequent portal row had highlighted (empty) fields is that the user would think, "What should I do? It's showing that it's required but I don't have any more records to enter." I suppose I could set change the default in the portal setup where "Allow creation of records..." is disabled so users wouldn't see an empty portal record. I'll have to think about that.
Ocean West Posted September 17, 2019 Posted September 17, 2019 I always like this technique. Portal.fmp12
comment Posted September 17, 2019 Posted September 17, 2019 25 minutes ago, WF7A said: The portal is required to have at least one record in it, hence the yellow field fill to alert the user that "Hey, you need to put enter at least one record here." I thought you wanted to highlight the required fields in a portal row. What you say now is different. It seems you want to highlight something in the first row - but only for as long as there is not a record in the first row.
Rich S Posted September 17, 2019 Author Posted September 17, 2019 A picture's worth a dozen posts, so I attached a couple of screen shots. In the first screen shot, the two, highlighted fields--in what is to be the first record--in the portal are highlighted because they're empty. After entering a record, the one-record requirement has been met so I don't need the subsequent rows in the portal highlighted, so that's what I want to accomplish--de-highlighting those empty/subsequent portal rows.
comment Posted September 17, 2019 Posted September 17, 2019 So something like this? Hilite1stRow.fmp12
Rich S Posted September 17, 2019 Author Posted September 17, 2019 Perfect! Thank you!! (...and thanks to Ocean West, too--that's a good technique to use, too.)
Recommended Posts
This topic is 1891 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now