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.

Value List and calculation won't work

Featured Replies

I have created a list report with a value list assigning values to fields of certain colours. All from 1 table – no related values. Layout is based on the same table.
The script filters the number of records with a certain colour.  The script button is located in the footer of the report.


Excursion scripts: Departure show Pink


Set Variable [ $DeptG; Value:customer::Dep_Date ]
Go to Layout [ “Departure_List” (customer) ]
Enter Find Mode [ Specified Find Requests: Find Records; Criteria: customer::Bus_Color: “=Pink” ]
[ Restore ]
Commit Records/Requests
Set Field [ customer::Dep_Date; $DeptG ]
Perform Find [ ]

(This script is assigned to 6 different buttons for each colour)


Every colour is assigned to a certain text value assigned by value list, which should show up in a calculation field in the header of the report for print purposes
The calculation field has a formula stored:


Case ( customer::Transpo 1 =  "Rail" ; "Rail" ; customer::Transpo 1  = "Globus Garage" ; "Globus Garage";Transpo 1 = "Gambrinus"; "Gambrinus";customer::Transpo 1 = "Tefra";"Tefra";customer::Transpo 1 = "Sprinter";"Sprinter";customer::Transpo 1 = "Individual";"Individual" )


I am encountering 2 problems:


1.)     When I trigger the script, the calculation field comes back with random values from the value list, but never the one set in the value list. It also somehow resets the value list to a random value not matching the calculation. It’ all messed up.
2.)    Whenever I click next to the records in the list, the values in the calculation field as well as in the value list disappear which spoils the purpose of printing the list.


Anyone with an idea, of where I messed up? I am sort of a rookie and assume that I have messed up something very basic here.
 

Graph.png

-Enter Find Mode, remove the existing find request (Restore)

-Remove Commit step, never needed while in find mode. 

But you appear to set a variable based on the current record, then do a find for that record.

Very confusing what you’re actually trying to do and where the calculation field fits in. 

Edited by Steve Martino

This calculation:

Case ( customer::Transpo 1 =  "Rail" ; "Rail" ; customer::Transpo 1  = "Globus Garage" ; "Globus Garage";Transpo 1 = "Gambrinus"; "Gambrinus";customer::Transpo 1 = "Tefra";"Tefra";customer::Transpo 1 = "Sprinter";"Sprinter";customer::Transpo 1 = "Individual";"Individual" )

does nothing useful that I can see. It returns whatever value is in customer::transpo1. You might as well return customer::transpo1.

 

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.