Jump to content

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

Recommended Posts

Hi Everyone,

I am having an issue with conditional formatting on a portal. Currently, I am attempting to have portal text change color when a record exists on a specific date in a related table. My problem is that it is only working for one portal row and not for the others. I have observed that it is only changing the portal row that is the "first" record created in the related table. As soon as I delete this record, the formatting is "bumped" to the next record that was created.

Any ideas how I could have the entire portal format correctly?

Thank you!

Link to comment
Share on other sites

Is the related date field calculated or is it a plain stored date field? Please post the CF calc you're using.

Link to comment
Share on other sites

Hi Fitch,

I am using an If statement. The date field is a plain stored field. I am note at my computer, but I will try to remember the exact format of the calc.

If(Date = Get(CurrentDate) & MatchID = Self, 1, 0)

 

Link to comment
Share on other sites

If(Date = Get(CurrentDate) & MatchID = Self, 1, 0)

That should probably read:

Case ( Date = Get ( CurrentDate ) AND MatchID = Self ; 1 ; 0 )

Note that you want the logical AND, not a string concatenation operator, and that you don't need If() or Case() to return True (1) or False (0), since the test expression itself is True or False; so you could simply write:

Date = Get ( CurrentDate ) AND MatchID = Self

Link to comment
Share on other sites

Could syntax cause this problem?

If you had a syntax problem, the calculation wouldn't be accepted; this is probably a semantic problem – does the calculation test what you want to test?

What is MatchID = Self supposed to do? Is that necessary?

In short, hard to tell without more details.

Link to comment
Share on other sites

Another thing to consider, sir, is that if the field Date is in a related table — you did say you're using this to format data shown in a portal — then make sure your calculation references the correct related Date field, i.e., the same table occurrence as that on which the portal is based:

If ( RelatedTableOccurence::Date = Get ( CurrentDate ) AND etc.

hth,

Mark

Link to comment
Share on other sites

Sorry for the late response. When I have applied the above calculations, I either get one portal row to change or the whole portal set. I can not get the portal rows with the correct date to highlight on their own.

I will continue to see if I can come up with a solution.

Thanks.

Link to comment
Share on other sites

Sorry for the late response. When I have applied the above calculations, I either get one portal row to change or the whole portal set. I can not get the portal rows with the correct date to highlight on their own.

These suggested calculations make (educated) guesses about your data.

Why don't you show us your calculations, and describe the data they're based on?

Link to comment
Share on other sites

If you had a syntax problem, the calculation wouldn't be accepted; this is probably a semantic problem – does the calculation test what you want to test?

What is MatchID = Self supposed to do? Is that necessary?

In short, hard to tell without more details.

Eos, What I was trying to do is make sure that the Match Id from the related record matched the portal row. It didn't work the way I though. 

Link to comment
Share on other sites

Hi EOS,

I figured out part of the problem. I am using a Cartesian related TO to show all of the available records. This (I believe) is why it is not working.

As you requested, this is what I am attempting to do...

I have 100 rooms that can be booked. I am attempting to Conditionally format fields for rooms that are booked for the current date. I want to be able to see all of the rooms in the portal and easily see which rooms are booked and which are available. I will then have a script attached to book the room for the current customer if it is available.

I was using the If(ArrivalDate = Get(CurrentDate) & MatchID = Self, 1, 0) to begin my calculation but it didn't work correctly, so I stopped. I will eventually want to add more to the calculation but I wanted to get a basic one working first to verify it can be done.

 

 

Link to comment
Share on other sites

This topic is 3227 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.