dynamicdan / sn-filesync

2-way sync ServiceNow field values to local files
MIT License
66 stars 37 forks source link

Initial Synchronize with files #39

Closed vrfox closed 7 years ago

vrfox commented 7 years ago

Im trying to do an initial sync of the instance, but only makes the folders structure

i tried also search: "all": { "table": "sp_widget", "download": true, "fullRecord": true, }

but how to put multiple tables

also looking for subdirparttern to save the html, css, and js of each record in a subfolder of the table folder but dont understand how

dynamicdan commented 7 years ago

Try a --search and then a --search --download on the command line. This should test that you can save things properly.

Alternatively, try checking out an older version or newer version of SN-filesync.

You can also try a --test to confirm there is no issue with filesync.

FYI, I also have an update to release soon.

vrfox commented 7 years ago
    "search": {
        "providers": {
            "table": "sp_angular_provider",
            "download": true,
        "records_per_search": 100
        },
        "widgets": {
            "table": "sp_widget",
            "download": true,
        "records_per_search": 100
        }
    },

i need to do 2 search to download both, but its ok, thank you

    "folders": {
        "widgets": {
            "table": "sp_widget",
            "key": "name",
            "fields": {
                "client.js": "client_script",
                "demo.js": "demo_data",
                "server.js": "script",
                "html": "template",
                "css": "css"
            },
            "subDirPattern": "<name>"
        },
        "angular_providers": {
            "table": "sp_angular_provider",
            "key": "name",
            "fields": {
                "js": "client_script"
            }
        }
    },
vrfox commented 7 years ago

also in widget from default folders you have scss, but it wont sync i had changed to css and now works

dynamicdan commented 7 years ago

thanks vr-fox for the tip. I have that fixed locally so far.

Search has 2 options. Just a search or search and download results. You shouldn't need to do 2 searches to get your files. SN-FileSync can search across multiple tables at once. Your encoded query might be a little complex though to take into account different fields on different tables.