Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

field for Icon in Portal

Featured Replies

Hi,

in my solution I have a layout with a portal on it. There is a delete button for each record in the portal (the last column). Now I would like to show this button dynamically because some of the records can't be deleted. So it useless to show the delete button.

I thought to use a global field and fill it with the button if delete is possible and leave it empty if not.

But I'm not sure how to aacomplish that.

Could someone help me?

Thx

by

ChiSao

Regardless of whether you display an icon in the portal your button will still be active and will therefore execute the action or run your script. You will need to take control from the script to ensure that records are not deleted.

On that basis, your script must be able to determine the criteria for deletion of the selected record, or not. The same criteria can be used for conditional formatting, or a calculation to populate a container (your icon).

Do not use a global field - it will not work.

  • Author

You right I forgot this problem but anyway I have already the script which prevents from deleting.

So I will use the conditional formatting to cover the button and the script to control the function of the button.

thx

Try this

New calc field; output set to container called:

b_Delete button


Case (



Isempty (primary key)=1;"";

not Isempty (primary key)=1 and delete status field = "delete"; table:icon delete;

not Isempty (primary key)=1 and delete status field = "don't delete"; ""

)

The first statement allows for this to not be seen if you have any portals with create records active on the relationship.

The second/third statement looks at the status you have about whether a record can be deleted or not.

In the case of adding a script,

If (Isempty (b_delete)=1)

Exit script

Else

Delete the record

There are other parameters to consider, but this is the simplest I think.

Please feel free to comment anything I may have missed.

Thanks

[see attached example]

Mike

Delete_Button_in_Portal.fp7.zip

Edited by Guest

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.