Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Screen Flow

Update the buttons in your app with conditional formatting to give them a more natural flow. To recap the steps in the video:

Add a Clear button

  1. Add a new button to the Businesses dashboard
    1. Right click on the Business tab and go to Open Palette → Basic Components
    2. Hold shift Shift and drag a new button on to the SimpleButtonHolder area.
  2. Configure the new button:
    1. Name: ClearBusinessFields ClearBusinessFields
    2. Action Type: Clear  Clear All Fields
    3. Order: 4
    4. Button Label: New New

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 before entering details for a new contactentry.

Using Conditional Formatting

Now we will hide a the buttons the users do not need to see when they are entering details for a new contactdata. We will 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 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.

  1. To conditionally hide the Delete buttonthe Delete button:
    1. Click on the Delete the Delete button to open the configuration detailsform
    2. Go to the section Formatting Rules
    3. Add a formatting rule
    4. Set the Rule Expression to _form.UID == _NULL
    5. Since there is currently no hidden style, we will add one:
      • Next to Styleto Style, press +
      • Set Name to Hidden
      • Click the Hidden flagSet Name to Hidden
      • Tick the Hidden flag
      • Save the new style
    6. In the formatting rule, set the Style to Hidden to Hidden
    7. Save the formatting rule
  2. Apply the same settings to the Update button
  3. Apply the same settings to the New button
  4. 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 the UID field is set:
    1. Open the configuration details form for the Add buttonthe Add button
    2. Add a formatting rule Formatting Rule
    3. Set the Rule Expression to _form.UID ! == _NULL
    4. set the Style to Hidden to Hidden
    5. Save the formatting rule

Go into App Mode, and check that when you press Newpress New, all fields are cleared, and the Updatethe Update, Delete and New buttons New buttons disappear, but the Add button 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_GoBack_GoBack