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.

How to enter data in Value list field using set field script step

Featured Replies

Hi there - Miss A! here, i need your help please.....

 

 

I wonder if this is possible - ok, i have a script in which i am using set field step to define a field on another layout, this field is set to use values from defined value list but i would like to set a value for it using script and without changing the fields data entry definition(that is without disabling use of value list) - see in script below for the lines with red font:

 

 

Approve Order
Set Variable [ $$Order; Value:Pack Safari Order::__ID_Order_PS_Number ]
Set Variable [ $$Token; Value:Pack Safari Order::lxt_Token_Company ]
Set Variable [ $$Account; Value:Pack Safari Order::lxt_LedgerAccount ]
Set Variable [ $$Description; Value:Pack Safari Order::lxt_Text_Order ]
Perform Find [ Specified Find Requests: Find Records; Criteria: Pack Safari Order::__ID_Order_PS_Number: “$$Order” ] [ Restore ]
Go to Layout [ “Order Pack Safari Print” (Pack Safari Order) ]
Set Variable [ $Signature; Value:Get ( AccountName ) ]
Set Field [ Pack Safari Order::lxt_Signature_Approved; $Signature ] Set Field [ Pack Safari Order::lxt_Approved_chk; 1 ]
Send Mail [ Send via E-mail Client; Subject: "Order Pack Safari ->" & Pack Safari Order::lxt_Token_Company; Message: "Dear Gloria," & ¶&¶&"Order Number " & Pack Safari Order::__ID_Order_PS_Number &" has been approved." & ¶&¶ & "Regards" &¶& Get(AccountName) ]
Go to Layout [ “Pack Safari Remittance New” (Pack Safari Remittance) ] // Set Error Capture [ On ]
// Enter Browse Mode
New Record/Request
// Set Variable [ $OrderRemittance; Value:Pack Safari Order::__ID_Order_PS_Number ] Set Field [ Pack Safari Remittance::__fkID_PS_Order_Number; $$Order ]
Set Field [ Pack Safari Remittance::Kürzel; $$Token ]
Set Field [ Pack Safari Remittance::Ledger_Accounts; $$Accounts ]
Set Field [ Pack Safari Remittance::Reference:; $$Description ]

Commit Records/Requests
[ Skip data entry validation; No dialog ]
Go to Layout [ “Order Pack Safari” (Pack Safari Order) ]

 

 

Evaluations to better this script also welcomed - thank you very much!!!

Is this script not working?  Possible problem, but could only be a typo...your Set Variable is $$Account, and your Set Field is $$Accounts.

I do not have time to review the script in depth but that was certainly a keen eye, Steve - nice catch!

Evaluations to better this script also welcomed

 

Is there a reason to use global $$variables?

 

[…]

Set Field [ Pack Safari Remittance::Kürzel; $$Token ]

[…]

 

You don't happen to speak German?  :laugh:

  • Author

Ohh really good eye Steve, thank you zoo much......

 

 

Is there a reason to use global $$variables?

Eos, i am not understanding myself well on the variable topic, i only switched my option for what is working - I began with local variables at first and it did not work, thetas when switched to global.......

 

 

You don't happen to speak German?  :laugh:

Ohh, i am working for Germans, I do not speak it yet.....

  • 1 month later...

Hi Miss A!,

 

Using global variables

$$example

means that they stay available in the background ready for use by another script. Which is great if you are about to call another script, but not so great if - you're not.

As then they will sit around in your database until you quit your current session - or you clear them at the end of your script.

 

Whereas, using local variables 

$example

will clear automatically at the end of the execution of the current script.

 

HTH

  • Author

Thank you fm_toxy,

 

 

Using global variables

$$example

Which is great if you are about to call another script, but not so great if - you're not.

By calling another script you mean you have not yet exited that session in which global variables are declared(other words, you are referencing global variables from a subscript) or can i call them from a separate script which is outside of the context in which global variables have been declared?

-More help will help, Thanx a lot.

 

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.