Announcement

Collapse
No announcement yet.

Use scriptcase macros in library create for project.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Use scriptcase macros in library create for project.

    good friends.
    i need help, i not understand use the macro in library new in project.
    the uses view error, por example sc_lokuup no call define.
    i use for tranning the macro in library project manager example

    help me, hhow to use macros and return value in var local for use data in mi project.


    function get_project_data($id_project){

    sc_lookup(prj,"SELECT * FROM projects WHERE projectid = $id_project ");

    $arr_project_data['recordowner'] = {prj[0][1]};
    $arr_project_data['projectlead'] = {prj[0][2]};
    $arr_project_data['lastmodifiedby'] = {prj[0][3]};
    $arr_project_data['projectname'] = {prj[0][4]};
    $arr_project_data['company'] = {prj[0][5]};
    $arr_project_data['contactname'] = {prj[0][6]};
    $arr_project_data['summary'] = {prj[0][7]};
    $arr_project_data['estimatedprojectstart'] = {prj[0][8]};
    $arr_project_data['estimatedprojectend'] = {prj[0][9]};
    $arr_project_data['projectpriority'] = {prj[0][10]};
    $arr_project_data['projectstatus'] = {prj[0][11]};
    $arr_project_data['notes'] = {prj[0][12]};
    $arr_project_data['start'] = {prj[0][13]};
    $arr_project_data['plannedfinishdate'] = {prj[0][14]};
    $arr_project_data['percentecomplete'] = {prj[0][15]};
    $arr_project_data['customercontact'] = {prj[0][16]};
    $arr_project_data['actualcost'] = {prj[0][17]};
    $arr_project_data['estimatedcost'] = {prj[0][18]};
    $arr_project_data['actualhours'] = {prj[0][19]};
    $arr_project_data['estimetedhours'] = {prj[0][20]};
    $arr_project_data['percentoverbudget'] = {prj[0][21]};
    $arr_project_data['datecreated'] = {prj[0][22]};
    $arr_project_data['datemodified'] = {prj[0][23]};


    $arr_project_info['project'] = $arr_project_data;

    return($arr_project_info);

    }

  • #2
    the code use in new button in application form_edit_project running ok. cero errors.
    $data=array();
    $data=get_project_data();
    var_dump($data);

    I create new library in my application. and uses library and create function for recovery data master quotatations.
    for the use sc_lokkup the error is no define call function sc_lokooup..
    how add uses de macros in lilbrary?.

    thanks you.
    this error in mi application.

    Fatal error: Call to undefined function sc_lookup() in C:\Program Files (x86)\NetMake\v8\wwwroot\scriptcase\app\Quotations \app_form_QuotationTable\project.php on line 8

    mi code is

    <?php

    function get_itemid_data($id_itemdid)
    {
    $data=array();

    sc_lookup(prj,"SELECT * FROM INVENTTABLE WHERE DATAAREAID = 'dpm' and itemid = $id_itemdid ORDER BY ITEMID","mssql_AX");



    $data=prj;
    //$arr_project_data['name'] = {prj[0][3]};
    //$arr_project_data['costdate'] = {prj[0][22]};
    //$arr_project_data['pricestandar'] = {prj[0][23]};

    return($data);

    }
    ?>
    Last edited by ayepes2003; 12-15-2014, 12:06 PM. Reason: complet info.

    Comment


    • #3
      Hello,

      I created a simple code in the library ( choose the option "public" and creating a new ).
      Selected in the application, works correctly.

      function search($x){
      sc_lookup(ds,"SELECT * FROM addresses WHERE adrsid='".$x."'");
      return {ds[0][1]};
      }
      --
      ScriptCase Team

      Comment

      Working...
      X