sirmatter Posted June 17, 2015 Posted June 17, 2015 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!
Fitch Posted June 17, 2015 Posted June 17, 2015 Is the related date field calculated or is it a plain stored date field? Please post the CF calc you're using.
sirmatter Posted June 17, 2015 Author Posted June 17, 2015 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)
eos Posted June 17, 2015 Posted June 17, 2015 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
sirmatter Posted June 17, 2015 Author Posted June 17, 2015 Thanks Eos, I'll give it a try. Is still don't understand why it will not work on multiple portal rows. It is only working on one with the current calc. Could syntax cause this problem?
eos Posted June 17, 2015 Posted June 17, 2015 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.
Mark Scott Posted June 17, 2015 Posted June 17, 2015 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
sirmatter Posted June 20, 2015 Author Posted June 20, 2015 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.
eos Posted June 20, 2015 Posted June 20, 2015 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?
sirmatter Posted June 20, 2015 Author Posted June 20, 2015 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.
sirmatter Posted June 22, 2015 Author Posted June 22, 2015 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.
sirmatter Posted June 24, 2015 Author Posted June 24, 2015 If anyone has any ideas, please let me know. I am still working through this issue. Thank you.
Lee Smith Posted June 24, 2015 Posted June 24, 2015 (edited) There is something you are not seeing, why not attach a copy of the file(s) so we can see your make up. See here ATTACHING A FILE on how to do this. Edited June 24, 2015 by Lee Smith
Recommended Posts
This topic is 3700 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