Skip to content

design form and opening form PPCS

Forums Forums SIMPOL Programming design form and opening form PPCS

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #84
    JD Kromkowski
    Participant

    I pretty sure I had a conversation like this back in 2009 when there were no detail blocks. 1. I design a form using Personal. In order to do this I have to open datasources and tables. Presumably, I open them as sbme1, because I won’t necessarily know what the ip address is going to be for where this form is going to be used in a multi-user application. (maybe this is where my mistake is? maybe I should open as ppcs with localhost?) Is this correct procedure so far? I save the form as a form (.sfx). 2. Now I want to use the form I just saved in a multi-user application which obviously must use ppcs. HOW? I have simpolserver running and the tables are opened as ppcstype1 either in Personal or programatically. I now open the form either in Personal or programmatically. The form opens, but only the master file shows up now of the detailblocks show up. (I can work around this by opening up and editing the .sfx to reflect the ip address of where the simpolserver is running. But how would I know that generically in advance.) There must be something I am missing.

    #2305
    Michael
    Keymaster

    On 06/09/2013 23:21, kromkowski wrote:
    > I pretty sure I had a conversation like this back in 2009 when there
    > were no detail blocks.
    >
    > 1. I design a form using Personal.
    >
    > In order to do this I have to open datasources and tables. Presumably,
    > I open them as sbme1, because I won't necessarily know what the ip
    > address is going to be for where this form is going to be used in a
    > multi-user application. (maybe this is where my mistake is? maybe I
    > should open as ppcs with localhost?)
    >
    > Is this correct procedure so far?
    >
    > I save the form as a form (.sfx).
    >
    > 2. Now I want to use the form I just saved in a multi-user application
    > which obviously must use ppcs.
    >
    > HOW?
    >
    > I have simpolserver running and the tables are opened as ppcstype1
    > either in Personal or programatically.
    >
    > I now open the form either in Personal or programmatically.
    >
    > The form opens, but only the master file shows up now of the
    > detailblocks show up.
    >
    > (I can work around this by opening up and editing the .sfx to reflect
    > the ip address of where the simpolserver is running. But how would I
    > know that generically in advance.)
    >
    > There must be something I am missing.

    Make sure that you use appwindow.openformdirect(). If you don't wish to, then have a look at the implementation of that function,
    since you will need to make sure you pass the open data sources, tables, default values, and locales to the opendataform1()
    function. remember that nothing is global, so you have to pass everything through that the function needs.

    Ciao, Neil

    #2307
    JD Kromkowski
    Participant

    Thank you for your responses, I think perhaps I am getting down to where
    the problem is.

    Does openformdirect() presuppose that all of the tables you plan to use
    are in 1 datasource?

    Right now I have two .sbms.

    One called employee.sbm which includes one table called EMPLOYEE.
    (apart from the systables).
    And one called wages.sbm which includes one table called WAGES.

    I have created a test form (TestForm1) which uses these two tables
    including detailblock. The datasource entries look like this:

    <datasource>
    <sourcetype>sbme1</sourcetype>
    <source>M:SimpolProjectsPayroll4binemployee.sbm</source>
    <sdf1table master="y">EMPLOYEE</sdf1table>
    </datasource>
    <datasource>
    <sourcetype>sbme1</sourcetype>
    <source>M:SimpolProjectsPayroll4binwages.sbm</source>
    <sdf1table>WAGES</sdf1table>
    </datasource>
    <childlinks>
    <sdf1link id="1">
    <sourcefield>FullName</sourcefield>
    <sourcetable>EMPLOYEE</sourcetable>
    <targetfield>FullName</targetfield>
    <targettable>WAGES</targettable>
    </sdf1link>
    </childlinks>

    First, just using Personal to test

    Simpolserver NOT running.

    1. I open TestForm1.sfx. (did NOT first open ds and tables) No problem.

    Simpolserver RUNNING.

    1. I open TestForm1.sfx (without first opening datasource or table.)
    Error 3 for both tables. (I understand this.)

    2. Now, I first open ppcstype1 datasource (using appropriate ip address
    and port) AND I open both tables EMPLOYEE and WAGES. Now, I try to open
    TestForm1.sfx. No errors, BUT only the mastertable data shows!

    Before, I go through the hoops of jamming EMPLOYEE and WAGES into one
    ..sbm (because I am pretty sure things will work if I do that) is that
    the issue? Is this a bug, a feature or a gotcha?

    This is a simple example, involving just small two tables, but in my
    brain I am thinking that jamming 20 or 30 or more tables with 10s of
    thousands of records into one sbm is not such a good idea?

    JDK

    On 09/09/13 6:40 AM, Neil Robinson wrote:
    > On 06/09/2013 23:21, kromkowski wrote:
    >> I pretty sure I had a conversation like this back in 2009 when there
    >> were no detail blocks.
    >>
    >> 1. I design a form using Personal.
    >>
    >> In order to do this I have to open datasources and tables. Presumably,
    >> I open them as sbme1, because I won't necessarily know what the ip
    >> address is going to be for where this form is going to be used in a
    >> multi-user application. (maybe this is where my mistake is? maybe I
    >> should open as ppcs with localhost?)
    >>
    >> Is this correct procedure so far?
    >>
    >> I save the form as a form (.sfx).
    >>
    >> 2. Now I want to use the form I just saved in a multi-user application
    >> which obviously must use ppcs.
    >>
    >> HOW?
    >>
    >> I have simpolserver running and the tables are opened as ppcstype1
    >> either in Personal or programatically.
    >>
    >> I now open the form either in Personal or programmatically.
    >>
    >> The form opens, but only the master file shows up now of the
    >> detailblocks show up.
    >>
    >> (I can work around this by opening up and editing the .sfx to reflect
    >> the ip address of where the simpolserver is running. But how would I
    >> know that generically in advance.)
    >>
    >> There must be something I am missing.
    >
    > Make sure that you use appwindow.openformdirect(). If you don't wish to, then have a look at the implementation of that function,
    > since you will need to make sure you pass the open data sources, tables, default values, and locales to the opendataform1()
    > function. remember that nothing is global, so you have to pass everything through that the function needs.
    >
    > Ciao, Neil
    >

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.