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 Security Management
    • Security Concepts
    • Intellectual Property
  • FileMaker Server Administration
    • FileMaker Server 17
    • FileMaker Server 16
    • FileMaker Cloud
    • FileMaker Custom SSL Certificates
    • oAuth and External Server Authentication
  • FileMaker Go & Mobile Strategies
    • FileMaker Go for iPhone & iPad
    • iBeacon Support
    • FileMaker IOS App SDK
  • FileMaker and the Internet
    • FileMaker DataAPI
    • FileMaker WebDirect
    • Custom Web Publishing
  • FileMaker Platform
    • FileMaker Pro Advanced 17
    • FileMaker Pro 16
    • Command Line Data Migration Tool
    • FileMaker Interface Features
    • FileMaker Schema & Logical Functions
    • Brain Food
    • Legacy FileMaker Platform Discussions
  • FMForums Affiliates & Sponsors
    • Productive Computing Support Forums
    • 360 Works Official Product Support Forums
    • Geist Interactive Product Support Forums
    • FileMaker Vendors
    • FileMaker Training Resources
  • FileMaker Classifieds
    • Announcements of FileMaker Product, Services or Resources
    • Classifieds
    • Tools Of The Trade
  • FM Forums Operations
    • FM Forums Feedback & Site News
    • Member Lounge
  • FileMaker Friday Night Chat's Topics

Blogs

There are no results to display.

There are no results to display.

Categories

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

Product Groups

  • Site Donations
  • Site Advertising

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Title


Industry


Location


Interests


Website URL


Skype


MSN


Yahoo


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
×

Important Information

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