Trigger a page edit to update page data

thugsb's Avatar

thugsb

02 Sep, 2015 07:42 PM

When you change the data def of a page, it doesn't seem to change the data that the page has when you read it by Web Services. This means that adding things into the new data def fields isn't easy, as the fields don't exist yet.

When you edit the page in Cascade and save it, the page then gets the new data def structure (even blank parts).

Is there a way to trigger this kind of editing by web services?

  1. 1 Posted by Wing Ming Chan on 02 Sep, 2015 07:57 PM

    Wing Ming Chan's Avatar

    Hi,

    There is no easy way to "trigger" the changes with web services without loosing the data. You have to store the data while you are changing the data definition. In Working with Data Blocks I talk about how to change data definitions associated with blocks. Everything said there is applicable to pages. The basic steps are:

    1. Create a blank StructuredData object out of the new data definition and copy all the data from the block/page to this object, and possibly assign new data to the new fields
    2. Assign this StructuredData object back to the block/page

    This should be quite straight-forward if you are just adding new fields, not removing existing fields or reorganizing them in groups.

    For more information, see Lesson 7: Synching Data.

    Wing

  2. Ryan Griffith closed this discussion on 24 Sep, 2015 12:11 PM.

  3. Wing Ming Chan re-opened this discussion on 04 Nov, 2015 08:51 PM

  4. 2 Posted by Wing Ming Chan on 04 Nov, 2015 08:51 PM

    Wing Ming Chan's Avatar

    Hi Cascade Web Service Developers,

    Will you be interested in a 3-part tutorial on Google Hangout? I am going to give an introduction to my library and show how to perform simple tasks like creating and editing assets. Details can be found on Online Tutorials.

    If you are interested, send me an email. You can find my email address on Web Services: Encapsulation, Reusability, and Simplicity.

    Wing

  5. Ryan Griffith closed this discussion on 04 Nov, 2015 09:19 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac