# Layout Calculations in FM20.2.1

**URL:** <https://the.fmsoup.org/t/layout-calculations-in-fm20-2-1/3727>\
**Category:** Floating Topics\
**Tags:** calculations, filemaker\
**Created:** [September 29, 2023, 10:32pm UTC](https://the.fmsoup.org/t/layout-calculations-in-fm20-2-1/3727 "2023-09-29T22:32:28Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![FileKraft](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/filekraft/32/1183_2.png) [@FileKraft](https://the.fmsoup.org/u/FileKraft)\
**Post date:** [September 29, 2023, 10:32pm UTC](https://the.fmsoup.org/t/layout-calculations-in-fm20-2-1/3727/1 "2023-09-29T22:32:28Z")

</div>

Found out that some calculations are not supported when used in a layout calculation:

Tried this:

LEt ( [

dp = Get ( DesktopPath ) ;  
tp = Get ( TemporaryPath )

] ;

List (

"DocumentsPath: " ; dp ;

"-" ;

"TempPath: " ; tp ;

"-" ;

"FilePath: " ; Get ( FilePath ) ;

"-¶" ;

"convertFM DocumentsPath: " ;

ConvertFromFileMakerPath ( dp ; 1 ) ;  
ConvertFromFileMakerPath ( dp ; 2 ) ;  
ConvertFromFileMakerPath ( dp ; 3 )

)  
)

it just stops rendering. The data viewer has no problems with it.

(Without the "ConvertFM ..." it works)

---

<div class="post-metadata">

**Author:** ![FileKraft](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/filekraft/32/1183_2.png) [@FileKraft](https://the.fmsoup.org/u/FileKraft)\
**Post date:** [September 29, 2023, 10:43pm UTC](https://the.fmsoup.org/t/layout-calculations-in-fm20-2-1/3727/2 "2023-09-29T22:43:38Z")

</div>

this works though:

\<\<ƒ:"DocumentsPath: " & Get ( DocumentsPath ) &

"¶TempPath: " & Get ( TemporaryPath ) &  
"¶FilePath: " & Get ( FilePath ) &  
"¶convertFM DocumentsPath: "  
& ConvertFromFileMakerPath ( Get ( DocumentsPath ) ; 1 ) & ¶  
// & ConvertFromFileMakerPath ( Get ( DocumentsPath ) ; 2 ) & ¶  
& ConvertFromFileMakerPath ( Get ( DocumentsPath ) ; 3 )

> >

---

<div class="post-metadata">

**Author:** ![FileKraft](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/filekraft/32/1183_2.png) [@FileKraft](https://the.fmsoup.org/u/FileKraft)\
**Post date:** [September 29, 2023, 10:49pm UTC](https://the.fmsoup.org/t/layout-calculations-in-fm20-2-1/3727/3 "2023-09-29T22:49:12Z")

</div>

So what is happening the ConvertFromFileMakerPath function with second parameter 2 = WinPath fails (on MacOS) and the layout calculation won't render whereas the data viewer returns "?" but evaluates all other valid expressions.

---

<div class="post-metadata">

**Author:** ![OliverBarrett](https://avatars.discourse-cdn.com/v4/letter/o/f19dbf/32.png) [@OliverBarrett](https://the.fmsoup.org/u/OliverBarrett)\
**Post date:** [September 30, 2023, 10:12am UTC](https://the.fmsoup.org/t/layout-calculations-in-fm20-2-1/3727/4 "2023-09-30T10:12:47Z")

</div>

Klinkt gut! Thanks, man. 🙂

---

<div class="post-metadata">

**Author:** ![FileKraft](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/filekraft/32/1183_2.png) [@FileKraft](https://the.fmsoup.org/u/FileKraft)\
**Post date:** [September 30, 2023, 11:47am UTC](https://the.fmsoup.org/t/layout-calculations-in-fm20-2-1/3727/5 "2023-09-30T11:47:22Z")

</div>

Doesn’t sound good to me. Remember fm11v1 introduced layout variables but if they weren’t assigned they just displayed the variable name on the layout in browse mode, this behavior was defended first then later corrected.

Here in my example the entire calculation shows up in browse mode if one part of the Calc statement fails …

---

<div class="post-metadata">

**Author:** ![OliverBarrett](https://avatars.discourse-cdn.com/v4/letter/o/f19dbf/32.png) [@OliverBarrett](https://the.fmsoup.org/u/OliverBarrett)\
**Post date:** [September 30, 2023, 1:05pm UTC](https://the.fmsoup.org/t/layout-calculations-in-fm20-2-1/3727/6 "2023-09-30T13:05:40Z")

</div>

I meant your posting sounded good (was good, useful knowledge). 🙂

---

<div class="post-metadata">

**Author:** ![FileKraft](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/filekraft/32/1183_2.png) [@FileKraft](https://the.fmsoup.org/u/FileKraft)\
**Post date:** [September 30, 2023, 3:33pm UTC](https://the.fmsoup.org/t/layout-calculations-in-fm20-2-1/3727/7 "2023-09-30T15:33:07Z")

</div>

![image](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/6/69e5521dc20fc282b5c017e0ed29834c4131b3d8.png)

---

<div class="post-metadata">

**Author:** ![OliverBarrett](https://avatars.discourse-cdn.com/v4/letter/o/f19dbf/32.png) [@OliverBarrett](https://the.fmsoup.org/u/OliverBarrett)\
**Post date:** [September 30, 2023, 4:12pm UTC](https://the.fmsoup.org/t/layout-calculations-in-fm20-2-1/3727/8 "2023-09-30T16:12:02Z")

</div>

I never doubted you or your results! 🙂

Hopefully Claris is aware of this issue and will issue yet another bug fix (YABF). LOL

---

<div class="post-metadata">

**Author:** ![FileKraft](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/filekraft/32/1183_2.png) [@FileKraft](https://the.fmsoup.org/u/FileKraft)\
**Post date:** [September 30, 2023, 4:23pm UTC](https://the.fmsoup.org/t/layout-calculations-in-fm20-2-1/3727/9 "2023-09-30T16:23:31Z")

</div>

thanks @OliverBarrett very much appreciated. I wish you would be the CEO of Claris International Inc.

---

<div class="post-metadata">

**Author:** ![Kirk](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/kirk/32/2197_2.png) [@Kirk](https://the.fmsoup.org/u/Kirk)\
**Post date:** [October 6, 2023, 4:24pm UTC](https://the.fmsoup.org/t/layout-calculations-in-fm20-2-1/3727/10 "2023-10-06T16:24:38Z")

</div>

Layout Calculation Object Observations.....

- a layout calculation CAN be placed in a **button** label verbatim, but CANNOT be placed in a button **bar** segment label verbatim.
- A layout calculation by itself as text on a layout, does not auto-resize the edit box when clicked, but IF you combine that calculation with any text, it behaves like legacy merge variables/fields and resizes when clicked.
- If you add a button action to a text based layout calculation (resulting in a grouped object), the calculation remains within the bounds of the button itself, instead of auto-resizing.
- A double-click of a layout calculation object. the edit box resizes. You have to manually resize it down again, but it retains that smaller size.
- Is there a calculation dialog shortcut associated with a layout object after creation, or do you have to context- or regular menu select to get the dialog?

I'm not sure I [currently as of now] see any advantage to a layout calculation that we did not already have in button bar segment calculations...... ???  
MAYBE (need to test), the GET calculations that, if in a button bar segment, do NOT work in a portal, but instead, return the information relative to the base layout, will work as a layout object.... TBD 🙂
