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.

Featured Replies

I have a text field with this autoenter calculation: List (Table::PrimaryID ; 1 ).

It works fine and returns the PrimaryID + carriage return + 1. No problem with that.

Is there a different behaviour if this field is used in a relationship that I don't know. Because in my solution, sometimes works some others it doesn't.

Thanks.

2 hours ago, Enigma20xx said:

sometimes works some others it doesn't.

Hard to tell what "works" means. What are you hoping to accomplish by having this field, and how exactly does it "sometimes" fail? 

 

  • Author

It’s been a few years now, and I hoped you remember English is not my native language, so I would have some kind of excuse, 🤣🤣🤣

3 tables. TableA, XREF/JoingAB, TableB

From TableA via a portal I choose an ID from TableB (VL) to create a related record in the XREF/JoinAB. A field in this table (AB) autoenters a calculation ( List (TableB::Name ; 1 ).

Not always the autoenter calculations works, does the job, functions... Sometimes it appears John + carriage return + 1. And some other times it only appears 1.

And I don't know why this happens, and if it could be because I use this field in a relationship.

15 minutes ago, Enigma20xx said:

autoenters a calculation ( List (TableB::Name ; 1 )

That's very different from:

3 hours ago, Enigma20xx said:

autoenter calculation: List (Table::PrimaryID ; 1 )

 

17 minutes ago, Enigma20xx said:

And some other times it only appears 1.

If only 1 appears, it means the auto-entered calculation was evaluated while there was no related record in TableB. Try changing the formula to something like:

Let (
trigger = B_ID
;
List (TableB::Name ; "1" )
)

where B_ID is the foreign key to TableB. Make sure the "Do not replace…" option is unchecked.


Still not sure why you need such normalization-breaking contraption.

 

  • Author

Shouldn't it be?

Let (
trigger = TableXREFAB::_ID
;
List (TableB::Name ; "1" )
)

or

Let (
trigger = TableXREFAB::TableB_IDf
;
List (TableB::Name ; "1" )
)

 

13 minutes ago, comment said:

Still not sure why you need such normalization-breaking contraption.

I try to make a filter for the portal. If the field has a name it shows it, but if it has 1, shows all.

I believe it should be:

Let (
trigger = TableB_IDf
;
List ( TableB::Name ; "1" )
)

(Since the field is in the same table as TableB_IDf, there is no need to include the TO name.)

 

20 minutes ago, Enigma20xx said:

I try to make a filter for the portal. If the field has a name it shows it, but if it has 1, shows all.

There are simpler ways to accomplish this. Ways that will not break if the related value is modified and the auto-entered value remains unchanged.

 

  • Author

The new record doesn't get created in TableB, it gets created in the XREFAB table.

I can't reproduce the issue in my example file, but I can't figure out what happens to my real solution...

Ejemplo.fmp12

2 hours ago, comment said:

There are simpler ways to accomplish this. Ways that will not break if the related value is modified and the auto-entered value remains unchanged.

I'm open to advices... 🤣

12 minutes ago, Enigma20xx said:

The new record doesn't get created in TableB, it gets created in the XREFAB table.

Yes, I understood that. But when you create that record and before you have entered a value in the TableB_IDf field, there is no related record in TableB, and the auto-entered calculation evaluates to "1".

 

15 minutes ago, Enigma20xx said:

I'm open to advices... 🤣

Here is the simplest way I could think of:

FilterByCategory.fmp12

  • Author
19 minutes ago, comment said:

Here is the simplest way I could think of:

As always, a master class. The simpler the better. 🥷

Thanks.

Even simpler: 

Give your portal an object name and use Refresh Portal instead of Refresh Window.

 

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.