June 17, 201510 yr 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!
June 17, 201510 yr Is the related date field calculated or is it a plain stored date field? Please post the CF calc you're using.
June 17, 201510 yr Author 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)
June 17, 201510 yr 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
June 17, 201510 yr Author 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?
June 17, 201510 yr 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.
June 17, 201510 yr 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
June 20, 201510 yr Author 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.
June 20, 201510 yr 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?
June 20, 201510 yr Author 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.
June 22, 201510 yr Author 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.
June 24, 201510 yr Author If anyone has any ideas, please let me know. I am still working through this issue. Thank you.
June 24, 201510 yr 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, 201510 yr by Lee Smith
Create an account or sign in to comment