Jump to content

Highlight only first row in a portal


Rich S

This topic is 1654 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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!

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

*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.

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

 

 

Screen Shot 2019-09-17 at 8.33.39 AM.png

Screen Shot 2019-09-17 at 8.35.44 AM.png

Link to comment
Share on other sites

This topic is 1654 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.