...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Widget Connector | ||||||
---|---|---|---|---|---|---|
|
Update the buttons in your app application with conditional formatting to give them a more natural flow. To recap the steps in the video:
Add a Clear
...
Button
- Add a new button to the
Businesses
dashboard.- Right-click on the
Business
tab and go to Open Palette → Basic Components. - Hold shift Shift and drag a new button on to onto the
SimpleButtonHolder
area.
- Right-click on the
- Configure In the new button, set:
- Name: ClearBusinessFields
ClearBusinessFields
- Action Type: Clear Clear All Fields
- Order:
4
- Button Label: New
New
- Name: ClearBusinessFields
Go into App Mode and try the new button. You will see that it clears the values from all fields on the form. Therefore, this This is a useful button to press click before entering details for a new contactentry.
Using Conditional Formatting
Now we will hide a the buttons the that users do not need to see when they are entering details for a new contactdata.
We will can hide the Delete
and Update buttons Update
buttons when the details on the screen are blank. To do this, we can test the value of UIDof UID
. Remember that the UID field the UID
field is configured on the edit screen , and is hidden - — but this means we can use the value of UIDof UID
. We know that UID is that UID
is always set for every record, so we can test whether this is null or not to work out whether the fields on the edit form are currently populated. Remember that to access a value on the edit form in an expression we can use _form.
- To conditionally hide the Delete buttonthe
Delete
button:- Click on the Delete the
Delete
button to open the configuration detailsform. - Go to the section Formatting Rules.
- Add a formatting rule.
- Set the Rule Expression to
_form.UID
== _NULL
- Since there is currently no hidden style, we will add one:.
- Next to Styleto Style, press click +
- Set Name to Hidden
- Click the Hidden flag and set:
- Name:
Hidden
- Hidden flag: tick
- Name:
- Save the new style.
- In the formatting rule, set the Style to Hidden to
Hidden.
- Save the formatting rule.
- Click on the Delete the
- Apply the same settings to the
Update
button. - Apply the same settings to the
New
button. - Now update the Add button the
Add
button so that it is not shown when the user is updating a record, that is, when the UID field theUID
field is set:.- Open the configuration details for the Add buttonform for the
Add
button. - Set the Add a formatting ruleFormatting Rule and set:
- Rule Expression
- :
_form.UID ! =
_NULL
- Style
- :
Hidden
- Save the formatting rule.
- Open the configuration details for the Add buttonform for the
Go into App Mode. Click New
, and check that when you press New, :
- all fields are cleared
...
- the
Update, Delete
and
...
-
New
buttons disappear - the
Add
button is shown.
Also check that when you select a record, the New and Add buttonsare the Add
button is not displayed but the Updatebutton is shown. Anchor
You can also apply this conditional formatting for buttons to the Contacts
dashboard and your templates.
Panel |
---|
Next video: 8. Styling Grids |