Jump to content

Search the Community

Showing results for tags 'multiselekt'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type

Community Forums

  • The New FileMaker Platform
  • Community Resources
    • Community Articles, Tips, & Techniques
    • FileMaker Marketplace Discussions
  • FileMaker Platform
    • FileMaker Interface Features
    • FileMaker Schema & Logical Functions
    • FileMaker Go for iPad and iPhone
    • FileMaker and the Internet
    • FileMaker Pro Advanced 18
    • FileMaker Pro Advanced 17
    • Legacy FileMaker Platform Discussions
  • FileMaker Server Administration
    • FileMaker Server 18
    • Zabbix Server Monitoring
    • FileMaker Server 17
    • FileMaker Cloud
    • FileMaker Custom SSL Certificates
    • oAuth and External Server Authentication
  • Brain Food
    • Security Concepts
    • The Left Brain
    • Upgrading & Migration
    • Data Analysis
    • Development Standards
    • The Separation Model
    • Relational Database Theory
    • Damaged / Corrupt File Problems
    • Bar Codes (Printer, Scanners, Software)
    • Hardware & Networking
    • OS Level Database Automation
    • Product Ideas
  • JavaScript Integration
  • FMForums Affiliates & Sponsors
  • FileMaker Classifieds
  • FM Forums Operations
  • FileMaker Friday Night Chat's Topics


There are no results to display.

There are no results to display.


  • White Papers
  • Infographics
  • Samples
  • Solutions
  • FMGo
  • Plug-Ins
  • Tutorials

Product Groups

  • Workplace Innovation Platform
  • Site Advertising
  • Development & Hosting


  • Community Calendar
  • FileMaker User Groups

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start







Website URL




OS Version

Found 1 result

  1. big hack#1 "JSON and FileMaker 16" https://t.me/filemaker_help January 25, 2018 In development process of information system definite records are required to be selected. For example, needed nomenclature could be added to shopping basket from product list. With 16 system release and adding functions JSON implementation of this task was greatly simplified. Earlier for user selects holding global field or supporting table was required. We had to follow that this field or table were emptied before every new selection procedure. Only public variable is needed now. All information about selected records can be easily added and read by using function JSON,, where the result will be the following JSON- text: “{"1":true,"3":true,"4":true}” in which 1,3 and 4 – keys , which name corresponds to chosen identifier (if we chose record with id 1,3 and 4). Every key gets assigned the same boolean value: true. Script , applying data-hold in JSON-text, is simply arranged . Let us suppose, we handle button, by which the user choses certain record or unselects. Thus we decided to store JSON-text in public variable $$JSON. STEP1 From the beginning we need to initialize JSON-text as it is not empty in initial state, it looks as : “{}”. We can do it once in the script, prenex user’s work with recordset. At this script item will appear : Set Variable [$$JSON; “{}”]. But we can dispence with preliminary script. For example, we can perform such check each time, user push the botton to “select” record. The check will look so: If (IsEmpty ($$JSON);"{}";$$JSON) Later identifier value of current record can be accounted and memorized in variable $id_record. Set Variable [$id_record; GetLayoutObjectAttribute ("id";"content")] In order to item in script worked with using function GetLayoutObjectAttribute, It is needed to place object on layout, displayed ID item, and name “id”. STEP2 Then you make sure existence of tandem in JSON-text, whose name of key corresponds to identifier. If current record has identifier 5, we have to find tandem “5”:true. Here we use function JSONGetElement JSONGetElement($$JSON; $id_record) STEP3 As such tandem doesn’t take place in our example, function returns “empty”. It means this tandem needs to be added to JSON-text by function JSONSetElement JSONSetElement ($$JSON; $id_record), результатом будет запись в $$JSON: “{"1":true,"3":true,"4":true, "5":true}” If JSONGetElement($$JSON; $id_record) returns 1, it means that in text record is already considered. We need to do back action,- delete tandem from JSON by function JSONDeleteElement JSONDeleteElement($$JSON; $id_record), if $id_record was equal to 3, so tandem "3":true," would be deleted and we would get: “{"1":true,"3":true,"4":true}” Thus , efforts are being made to fix and regulate chosen item in case of using JSON-function – minimum. Let us draw our conclusion. For implementation of this task we need: To create JSON-text in public variable $$JSON To check using function JSONGetElement, if value from $id_record took place in $$JSON. If it there isn’t , needed value from $id_record should be added in $$JSON using JSONSetElement If record should be deleted from $$JSON, we use JSONDeleteElement. Script "CheckButton" from MS.fmp12 #Write the current value of the object named id Set Variable [ $record_id; Value:GetLayoutObjectAttribute ( "id";"content" ) ] #check if there is a JSON variable Set Variable [ $$MULTISELECT_LIST; Value:If (IsEmpty ($$MULTISELECT_LIST);"{}"; $$MULTISELECT_LIST ) ] #switch if the variable is empty then write, otherwise delete If [ JSONGetElement ( $$MULTISELECT_LIST;$record_id)] Set Variable [ $$MULTISELECT_LIST; Value: JSONDeleteElement ( $$MULTISELECT_LIST;$record_id )] Else Set Variable [ $$MULTISELECT_LIST; Value: JSONSetElement ( $$MULTISELECT_LIST;$record_id; 1; JSONBoolean) ] End If #refresh checkboxes Refresh Window Refresh Object [ Object Name: "checkbox" ] Download file MS.fmp12 Invest in the development of our project We are ready to help in your development projects. Contact us and we will try to help you: artidog@gmail.com MS.fmp12
  • Create New...

Important Information

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