Colour Coding
Hi There,
I have a formulae field that sums the number of guests in a subtable.
I would now like it to be green if the formaulae field number is smaller then "Max Pax" and red if larger
I have used the style code but i keep getting end expected and can't seem to have more then one coding in the same area i.e if function then style function
11 replies
-
There are several methods to achieve this, this is one of those:
let S := sum(Guests.GuestsPresent); if S > 'Max Pax' then styled(text(S), "red") else styled(text(S), "green") end
Steven
-
Have you looked into Conditional Styling for columns? This is helpful if you only want to see it in a table view.
In a table view or view element, if you click on the column name you will see the Conditional Styling text. If you click on that you will see a blank Conditional Styling window. Click on Add Rule and then put in rules for how you want the cells formatted.
-
Okay I have a slightly different take on this:-
I have some number fields that I want to say as number and indeed some text fields that I want to be styled (Highlighted in some way) but don't want to convert the underlying values.
This is mainly for a partially sighted member of staff that helps with some data entry that
So for this staff member I have a duplicate form (but I am showing you a cut down sample version here)
So in this simple sample i have 2 fields - qty and desc
I added next to each of them 2 formula fields fxQty and fxDesc (which both can by styled and set to bigger font etc) and both point to the prev two fields.
At the top of the form I have an Edit Form? yes/no field (this is set to true on form creation)
the Qty and Desc fields display if - is set to when "Edit form?" is true and the fxQty and fxDesc formula fields display if - is set to when "Edit form?" is false
The save button only displays when in edit mode and itself turns of the edit form? flag
at the bottom of the form there is button to update and copy the whole form into the main table but thats another story......
Content aside
- 2 yrs agoLast active
- 11Replies
- 441Views
-
5
Following