OOTB Three-State Workflow not funtioning correctly

I am trying to create a Three-State OOTB Workflow on a document library. I have created an additional column in the document library called "Assigned Document To:". (Type: Person or Group)
When I upload the document the workflow instantly assigns the task to me, instead to waiting on me to assigned it to the user in the "Assigned Document To:". field.
Does anyone know how to fix this? Again this is OOTB. NO SharePoint Designer involved.

Hi ,
How do you assign the task to the list column "Assigned Document To" in the Three-State OOB workflow?
Please set the "Task assign to" value to the proper list column as you want per the following image.
And here are two posts about how to use the Three State OOB workflow you can take a look.
http://plexhosted.com/billing/knowledgebase/231/How-to-add-a-Three-state-Workflow-to-SharePoint-site-SharePoint-2010.html
http://office.microsoft.com/en-us/windows-sharepoint-services-help/use-a-three-state-workflow-HA010154431.aspx
Thanks
Daniel Yang
TechNet Community Support

Similar Messages

  • Three state workflow not complete

    Hello,
    I'got some trouble with the OOB Three state workflow
    It's creating the first task, I change the status to completed and save, it create the second task , I do the same stuff but the workflow doesn't completed.. 
    When I look to the task list I can see that the first task has the % complete to 100% but not the second, if I try to edit the second task to add this 100 I've got the error "This task is currently locked by a running workflow and cannot be edited. "
    If I try to set this 100% when I accept the second task , it doesn't complete the workflow...
    What Am I doing wrong?
    Best regards, Christopher.
    Blog |
    Mail
    Please remember to click "Mark As Answer" if a post solves your problem or
    "Vote As Helpful" if it was useful.

    The workflow shouldn't be completing if you just duplicate the exact same set of activities for the second task assignment
    as you used for the first. Just make sure you use different task tokens, but use the exact approach for task 2 as task 1. The workflow will not complete until both tasks are done.
    The approval workflow then assigns a task to each participant in the workflow, who must perform an action on the task. When all the tasks
    are complete, the overall task process is complete.Each of these task events must be complete instead of set the percent  before
    the task process can be complete 
    please check the process as follows
    http://office.microsoft.com/en-us/sharepoint-designer-help/use-the-task-process-editor-for-approval-workflows-HA101863538.aspx
    http://office.microsoft.com/en-us/sharepoint-server-help/use-a-three-state-workflow-HA101793530.aspx

  • Error Occured - Three state workflow

    http://www.eggheadcafe.com/software/aspnet/33106814/error-occured--three-state-workflow.aspx
    I faced this issue and was able to resolve it. I am hoping this will
    be helpful to someone who might get into trouble using the default
    three state workflow.
    I created a list and tried to use the default Three state workflow.
    The workflow was enabled to start as soon as a new list item was
    created. It started and the status was "Error Occurred". Being a Java
    guy I didn't know where to look for this error. I checked the Event
    Viewer but not much help. Is there a log file for Project Server
    application?
    Here is the reason why this happened. I had to go through most of my
    fields in the custom list to understand what was causing this problem.
    I had a field called Owner and I had enabled this option "Allow
    multiple selections: ". This caused something to break in the
    workflow. I am assuming it cannot handle a Person/Group field that
    allows multiple selections even though none of the list items actually
    had multiple persons selected.
    Hopefully this will help someone in the future if they enable any
    Person/Group field to have multiple selections.
    Kamlesh.

    http://www.eggheadcafe.com/software/aspnet/33106814/error-occured--three-state-workflow.aspx
    I faced this issue and was able to resolve it. I am hoping this will
    be helpful to someone who might get into trouble using the default
    three state workflow.
    I created a list and tried to use the default Three state workflow.
    The workflow was enabled to start as soon as a new list item was
    created. It started and the status was "Error Occurred". Being a Java
    guy I didn't know where to look for this error. I checked the Event
    Viewer but not much help. Is there a log file for Project Server
    application?
    Here is the reason why this happened. I had to go through most of my
    fields in the custom list to understand what was causing this problem.
    I had a field called Owner and I had enabled this option "Allow
    multiple selections: ". This caused something to break in the
    workflow. I am assuming it cannot handle a Person/Group field that
    allows multiple selections even though none of the list items actually
    had multiple persons selected.
    Hopefully this will help someone in the future if they enable any
    Person/Group field to have multiple selections.
    Kamlesh.

  • Delete Statement is not working correctly

    Hello,
    The following delete statement is not working correctly.
    If I press delete it will delete everything in the category table
    I don't know whats wrong with it.
    ----delete row from category if there is not infrastructure to support------
    IF :P12_DFCY_SEQNO4 IS NOT NULL AND :P12_DFCY_CATG_C = '7' THEN
    DELETE FROM DFCY_CATG
    WHERE NOT EXISTS(SELECT I.DFCY_SEQNO
    FROM DFCY_CATG C, DFCY_CATG_INFRSTRCTR I
    WHERE C.DFCY_SEQNO = I.DFCY_SEQNO
    AND :P12_DFCY_SEQNO4 = I.DFCY_SEQNO);
    end if;
    Thanks
    Mary

    Hi,
    IF :P12_DFCY_SEQNO4 IS NOT NULL AND :P12_DFCY_CATG_C = '7' THEN
    DELETE FROM DFCY_CATG
    WHERE NOT EXISTS(SELECT I.DFCY_SEQNO
    FROM DFCY_CATG C, DFCY_CATG_INFRSTRCTR I
    WHERE C.DFCY_SEQNO = I.DFCY_SEQNO
    AND :P12_DFCY_SEQNO4 = I.DFCY_SEQNO);
    end if;So, if P12_DFCY_SEQNO4 does not exist, then I would expect all records to be deleted because the NOT EXISTS() function would just return TRUE for every record on the table. Somewhere in the statement, I would expect to see something that links between the table being deleted from and the NOT EXISTS() data or, perhaps, using the P12_DFCY_CATG_C value as a filter?
    Andy

  • Financial Statement hierarchy not extracted correctly from ECC into BW.

    Recently, one of my clients modified a FS hierarchy in production environment by moving some nodes from revenue to expenses, but BW is not picking up the change.
    In ECC via transaction FSE3, one of our Financial Statement hierarchies shows three nodes - (Group Life_, Vehicle Plan only_, and Cost of Removal_) as Expenses. However, the BW extractor still shows these three nodes as Revenue and loads the hierarchy into BW that way as well.
    DataSource is 0GL_ACCOUNT_T011_HIER with field HIENM = AE03. When running RSA3 Extractor Checker in ECC, the displayed data still shows the three nodes in question as Revenue and not correctly as Expenses.
    Found SAP note 1061847 - Ind. For reversing plus/minus signs not extracted correctly. Applied note in ECC development environment, tested the extractor, and checked the load into BW, but the error regarding the nodes still exists after applying the fix.
    Appreciate any suggestions or thoughts from the community.
    Thanks!
    SAP landscape is as follows:
    SAP_BW     700     0009     SAPKW70009     SAP NetWeaver BI 7.0
    SAP_AP     700     0007     SAPKNA7007     SAP Application Platform
    SAP_BASIS     700     SAPKB70010     SAP Basis Component

    Thanks SDNBI. I reviewed the suggested OSS note 1037447, but I am not sure how it applies in my situation. The suggested note seems to address a problem with the display of transfer structure in BW. Our problem seems to be that the extractor on ECC is incorrectly extracting the hierarchy structure. When viewing the data in RSA3 extract checker in ECC, I see the three nodes in question incorrectly positioned in the hierarchy. Thus loaded the same incorrect way into BW. Yet, when I display the hierarchy through transaction FSE2, the three nodes are displayed correctly.

  • Three Point Edit not working correctly :(

    Hi there,
    first of all I'd like to say thank you Adobe for listening to your users. And I hope this one gets noticed right away....:
    It appears that 3 point editing ist not working correctly.
    Right now I'm editing a video and I heavily rely on 3 point editing.
    I have quite a lot XDCAM EX 50i clips which are all in one sequence that is used as source.
    Coming from tape workflows I really don't like clicking clip after clip...I need to edit
    Now fortunately one can choose to either have a sequence as source edited in nested or as individual tracks. Very nice!
    Very bad is that 3 point editing only works when "nested" is activated. Again, very bad!
    As soon as I want to use my source sequence with its individual tracks and hit (.) or (,) just nothing happens. Hmpf!
    Come on guys, that is essential editing stuff, not fancy speech detection blabla...sorry but this is mega-annoying right now....
    It says "Pro" right after "Premiere". So please make it pro! Professionals need ROCK SOLID essential functions.
    Make us editors happy having switched from Avid/FCP etc.
    Make essential stuff rock solid. That's what makes an app "pro".
    Cheers and please mind my harsh words. Just a little upset right now. (I know that's not pro either )

    bmfm_ wrote:
    I have quite a lot XDCAM EX 50i clips which are all in one sequence that is used as source.
    Now fortunately one can choose to either have a sequence as source edited in nested or as individual tracks. Very nice!
    Very bad is that 3 point editing only works when "nested" is activated. Again, very bad!
    Hi bmfm,
    I think I know what's going on. The behavior you describe happens when you try to edit back into your original sequence. Can try making a new sequence to cut your selects into? See the page in help for details: http://helpx.adobe.com/premiere-pro/using/edit-sequences-loaded-source-monitor.html
    Thanks,
    Kevin

  • Workflow not working correctly when removing resource attributes

    (Comment: I have to say that posting to this forum is a real pita. It takes me upwards of 20 minutes to figure out why various words are not allowed, with no indication of what is wrong. For some reason ba lt im ore is a forbidden word so I replaced it with FirstLocation.)
    I have a bulk action script that calls a workflow (below) to remove some locations from a users resource. What is happening is that it loops through and correctly removes 'FirstLocation'. Then it loops through the second pass and correctly removes 'Portland', however, on the third pass, Portland comes back - it's like the removal doesn't take for some reason. Is there something I should be updating differently to get this to remove the locations correctly?
    This is the Task Definition:
    <Variable name='remLocation'>
      <list>
        <s>FirstLocation</s>
        <s>Portland</s>     
        <s>Chicago</s>
        <s>Charleston</s>
        <s>Cleveland</s>
        <s>Lynnfield</s>
        <s>Roanoke</s>
        <s>Worthington</s>
        <s>Yorktown</s>
        <s>Hawthorne</s>
      </list>     
    </Variable>
    <Variable name='newJustification'>
      <s>Obsolete Locations remd</s>
    </Variable>     
      <Activity id='0' name='start'>
        <Transition to='Initialize' />
        <WorkflowEditor x='43' y='10' />
      </Activity>
      <Activity id='1' name='Initialize'>
        <Action id='0' name='Set variables'>
          <expression>
            <block name='INIT' trace='true'>
            </block>
          </expression>
        </Action>
        <Transition to='Make Account Changes' />
        <WorkflowEditor x='105' y='10' />
      </Activity>
      <Activity name='Make Account Changes'>       
        <Action id='1' name='update lh account'>
          <expression>
          <block trace='true'>
            <!-- if locationMap contains one of remLocation, delete that location and all attributes -->       
            <defvar name='tmpLocMap2'>
              <ref>user.accounts[FACILITIES].properties.locationMap</ref>
            </defvar>
            <!-- for all elements in the remLocation list -->
            <dolist name='elLoc'>
              <ref>remLocation</ref>
              <block trace='true'>
              <set name='tmpLocMap2'>           
                <!-- if element is in the list, ie, if the index is not -1 (not in list) -->
                <cond>
                     <neq>
                    <indexOf>
                      <ref>user.accounts[FACILITIES].properties.locationMap[*].name</ref>                
                         <ref>elLoc</ref>                       
                       </indexOf>
                    <i>-1</i>
                  </neq>                          <!-- then rem it from the object list -->
                  <block trace='true'>
                  <!-- get the index # -->
                  <defvar name='objectIndexNo'>
                      <indexOf>
                        <ref>user.accounts[FACILITIES].properties.locationMap[*].name</ref>                         
                            <ref>elLoc</ref>               
                      </indexOf>                   
                    </defvar>
                    <rem>
                      <filternull>
                        <ref>user.accounts[FACILITIES].properties.locationMap</ref>
                      </filternull>                       
                      <get>
                        <filternull>
                          <ref>user.accounts[FACILITIES].properties.locationMap</ref>
                        </filternull>
                        <ref>objectIndexNo</ref>                         
                      </get>                         
                    </rem>
                  </block>                   
                  <ref>tmpLocMap2</ref>                   
                </cond> 
              </set> 
                      <set>                   
                        <ref>user.accounts[FACILITIES].properties.locationMap</ref>                     
                        <ref>tmpLocMap2</ref>
                      </set>                 
                    </block>             
                  </dolist>
                  <set>
                    <s>user.accounts[FACILITIES].properties.justification</s>
                    <ref>newJustification</ref>
                  </set>
                  <set>
                    <s>user.accounts[FACILITIES].justification</s>
                    <ref>newJustification</ref>
                  </set>           
                </block>
              </expression>
            </Action>
            . . . and here's some of the debug code showing what happens:
    <dolist name='elLoc'>
      <ref>remLocation</ref> --> [FirstLocation, Portland, Chicago, Charleston, Cleveland, Lynnfield, Roanoke, Worthington, Yorktown, Hawthorne, ...truncated...]
      <block trace='true'>
        <set name='tmpLocMap2'>
        </set> --> null
        <set name='tmpLocMap2'>
          <cond>
            <neq>
              <indexOf>
                <ref>user.accounts[FACILITIES].properties.locationMap[*].name</ref> --> [FirstLocation, Shelbyville, Portland, Syracuse]
                <ref>elLoc</ref> --> FirstLocation
              </indexOf> --> 0
              <i>-1</i> --> -1
            </neq> --> 1
            <block trace='true'>
              <defvar name='objectIndexNo'>
              </defvar> --> null
              <rem>
                <filternull>
                  <ref>user.accounts[FACILITIES].properties.locationMap</ref> --> [GenericObject:FirstLocation, GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
                </filternull> --> [GenericObject:FirstLocation, GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
                <get>
                  <filternull>
                    <ref>user.accounts[FACILITIES].properties.locationMap</ref> --> [GenericObject:FirstLocation, GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
                  </filternull> --> [GenericObject:FirstLocation, GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
                  <ref>objectIndexNo</ref>
                    [<defvar name='objectIndexNo'>]
                      <indexOf>
                        <ref>user.accounts[FACILITIES].properties.locationMap[*].name</ref> --> [FirstLocation, Shelbyville, Portland, Syracuse]
                        <ref>elLoc</ref> --> FirstLocation
                      </indexOf> --> 0
                    [</defvar>] --> 0 --> 0
                </get> --> GenericObject:FirstLocation
              </rem> --> [GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
            </block> --> [GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
          </cond> --> [GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
        </set> --> null
      my comment: At this point FirstLocation has been remd successfully from tmpLocMap2.
      <remAll>
          <ref>user.accounts[FACILITIES].properties.locationMap</ref> --> [GenericObject:FirstLocation, GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
        </remAll> --> [GenericObject:FirstLocation, GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
        <set>
          <ref>user.accounts[FACILITIES].properties.locationMap</ref> --> [GenericObject:FirstLocation, GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
          <ref>tmpLocMap2</ref> --> [GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
        </set> --> null
      </block> --> null
      <block trace='true'>
        <set name='tmpLocMap2'>
        </set> --> null
        <set name='tmpLocMap2'>
          <cond>
            <neq>
              <indexOf>
                <ref>user.accounts[FACILITIES].properties.locationMap[*].name</ref> --> [Shelbyville, Portland, Syracuse]
          my comment: the locationMap above shows that FirstLocation was successfully remd.
                <ref>elLoc</ref> --> Portland
              </indexOf> --> 1
              <i>-1</i> --> -1
            </neq> --> 1
            <block trace='true'>
              <defvar name='objectIndexNo'>
              </defvar> --> null
              <rem>
                <filternull>
                  <ref>user.accounts[FACILITIES].properties.locationMap</ref> --> [null, GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
                </filternull> --> [GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
                <get>
                  <filternull>
                    <ref>user.accounts[FACILITIES].properties.locationMap</ref> --> [null, GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
                  </filternull> --> [GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
                  <ref>objectIndexNo</ref>
                    [<defvar name='objectIndexNo'>]
                      <indexOf>
                        <ref>user.accounts[FACILITIES].properties.locationMap[*].name</ref> --> [Shelbyville, Portland, Syracuse]
                        <ref>elLoc</ref> --> Portland
                      </indexOf> --> 1
                    [</defvar>] --> 1 --> 1
                </get> --> GenericObject:Portland
              </rem> --> [GenericObject:Shelbyville, GenericObject:Syracuse]
            </block> --> [GenericObject:Shelbyville, GenericObject:Syracuse]
          </cond> --> [GenericObject:Shelbyville, GenericObject:Syracuse]
        my comment: and here Portland was successfully remd.
        </set> --> null
        <remAll>
          <ref>user.accounts[FACILITIES].properties.locationMap</ref> --> [null, GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
        </remAll> --> [null, GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
        <set>
          <ref>user.accounts[FACILITIES].properties.locationMap</ref> --> [null, GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
          <ref>tmpLocMap2</ref> --> [GenericObject:Shelbyville, GenericObject:Syracuse]
        </set> --> null
      </block> --> null
      <block trace='true'>
        <set name='tmpLocMap2'>
        </set> --> null
        <set name='tmpLocMap2'>
          <cond>
            <neq>
              <indexOf>
                <ref>user.accounts[FACILITIES].properties.locationMap[*].name</ref> --> [Shelbyville, Portland, Syracuse]
          my comment: but above, when referenced, Portland hasn't really been remd. Why not??
                <ref>elLoc</ref> --> Chicago
              </indexOf> --> -1
              <i>-1</i> --> -1
            </neq> --> 0
            <ref>user.accounts[FACILITIES].properties.locationMap</ref> --> [null, GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
          </cond> --> [null, GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
        </set> --> null
        <remAll>
          <ref>user.accounts[FACILITIES].properties.locationMap</ref> --> [null, GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
        </remAll> --> [null, GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
        <set>
          <ref>user.accounts[FACILITIES].properties.locationMap</ref> --> [null, GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
          <ref>tmpLocMap2</ref> --> [null, GenericObject:Shelbyville, GenericObject:Portland, GenericObject:Syracuse]
        </set> --> null
      </block> --> null
      <block trace='true'> Any suggestions would be appreciated. Thanks much!
    Edited by: user12836258 on Sep 7, 2011 10:14 AM
    Edited by: user12836258 on Sep 7, 2011 10:15 AM

    it is working over there and changing the status also.
    But when through workflow same values come, it didnt work
    Check the authorizations associated with WF-BATCH user, i feel like it can be a authorization issue, as you were saying that it is working fine from the BOR method and when it is trying to update the same through workflow the workitem is gogin into error state.
    Make sure that teh WF-BATCH user is having SAP_ALL

  • Text Hyperlink states are not working correctly

    I am having an issue with the states changing correctly with text hyperlinks.  I have five on one page and they should all act the same way.  Only the first one changes correctly.

    Hi
    Can you please check that if "Edit Together" is unchecked in menu widget ? It may be the possibility that you made changes to individual menu item while edit together was unchecked.
    Also, I believe you are referring to main menu items , not sub items as they will not follow the same state defined.
    Thanks,
    Sanjit

  • Photo uploader not funtioning correctly

    Operating PSE 9 on a Mac. Since update to Camera Raw 6.5.0.216 occured yesterday, I have the following issue in the "Photo Downloader":
    When I click on the "Save Options"  .. "Location"   ... "Choose" button the Finder window appears. However, the Finder window does not respond to the mouse, or any keyboard input. Was fine until latest update. Any thoughts.
    Also like many people I have the ongoing issue with time corruption in the organiser - I had hoped this latest update would fix that!
    Any help appreciated.

    See if this helps:
    http://kb2.adobe.com/cps/920/cpsid_92046.html
    also:
    http://feedback.photoshop.com/photoshop_family/topics/elements_organizer_and_bridge_freeze _in_adobe_photo_downloader_when_you_click_choose
    MTSTUNER

  • Three State Workflow (assigned to field)

    I use the 3 State WF in a library. First and second task were assigned each to a person from 1 of 2 list fields of the library. But after first person completes the task and second task is created the person from second list field ist inserted in first
    list field. Why? It's a bug? Is there a workaround? (I don't have the possibility to use normal WFs, I can only use this WF)

    this is the first page of the WF settings (you ever saw this?)
    On the second page you can insert details for the first and second task, which the WF creates. There is a field 'Task Assigned To' which I filled with the content from a column of type 'person or group' of the library (Responsible Review). This one is for
    the first task, the other for the second is configured in the same way with an other 'person or group' column (Responsible Release).
    Before I start the WF, there are 2 different persons in the 2 columns, after completing the first task the WF creates the second task, and then (I can't see, is it after completing first task or after creating second task) field 'Responsible Review' in the
    library changed it's content to the content of column 'Responsible Release'

  • HT1491 Bought and downloanded an album, but the last three songs did not load correctly and when i play them on my ipod they turn off before the end of the song. Itunes says all songs downloaded. How can this be fixed?

    Bought and downloaded an album from Itunes. Now when I play it on my Ipod the last three songs are cut short. Itunes says all songs are downloaded, no incomplete downloads. How can this be fixed?

    Hi..
    Try re downloading ...
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • Three State Approval Workflow Error

    I have created one Task List. Add Three state approval workflow to it.
    When i created New Task. It started workflow. But after couple of minutes it throws error "Error Occured". How to find error.
    Please let me know. If you know any resolution for workflow error then also let me know.
    Thanks in advance.

    Hi,
    Please go to the task list settings page, click Assigned to column and check "No" for "Allow multiple selections", then check whether the issue still exists or not.
    Here are two threads for your reference:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/9231b505-7e78-4e98-b6c0-02ad85b247c3/error-occured-three-state-workflow-multiple-selection?forum=sharepointcustomizationlegacy
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/5a9f37ea-40b4-494b-b4af-db15be9d91ff/error-occured-three-state-workflow?forum=sharepointgenerallegacy
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • SQL not parsed correctly Why is meant by SQL Statements Larger than 32KB?

    I execute the following code
         begin
              dbms_output.put_line('b4 Constructing query 2');
              v_retail_rate_query_a:='select *
              from Rate R
              where rate_id=:v_RateID
              and service_id=:p_ServiceID
    AND SUBSTR(R.Area_Code, 1, LEAST(LENGTH(:v_Orig_Number), LENGTH(R.Area_Code))) = SUBSTR(:v_Orig_Number, 1, LEAST(LENGTH(:v_Orig_Number), LENGTH(R.Area_Code)))
    AND LENGTH(R.Area_Code) <= LENGTH(:v_Orig_Number)
              v_query_a_length:=length(v_retail_rate_query_a);
              dbms_output.put_line('v_retail_rate_query_a ' || v_retail_rate_query_a || ' |');
              dbms_output.put_line('v_query_a_length ' || v_query_a_length || ' |');
         exception
              when others then
              :v_ErrNumber:=-1800;
         end;
    But the statement is not parsed correctly why is this so? with reference to http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96590/adg09dyn.htm#26624
    32k /8 would have give me at most 4000 characters. the query certainly does not have 4000 characters.
    Anybody could enlighten me with the reason why oracle could not parse my query? Is there a way to insert '\n' in Pl/SQL?
    thanks!

    You do in your select statement length(r.area_code) <= length(:v_orig_number), so least(length(:v_orig_number),length(area_code)) will always return
    length(r.area_code).
    substr(r.area_code,1,least(length(:v_orig_number),length(r.area_code))) will return area_code because substr(r.area_code,1,length(r.area_code)) will return r.area_code.
    SUBSTR(:v_Orig_Number, 1, LEAST(LENGTH(:v_Orig_Number), LENGTH(R.Area_Code))) will return
    SUBSTR(:v_Orig_Number, 1,length(r.area_code)).
    I believe you can use select statement
    select *
    from rate
    where rate_id = cp_rate_id
    and service_id = cp_service_id
    and cp_orig_number like area_code||'%';
    Use this PL/SQL code.
    set serveroutput on
    declare
    cursor c_rats( cp_rate_id     in rate.rate_id%type
                 , cp_service_id  in rate.service_id%type
                 , cp_orig_number in varchar2)
           is
           select *
           from   rate
           where  rate_id           = cp_rate_id
           and    service_id        = cp_service_id
           and    cp_orig_number like area_code||'%';
    begin
      for r_rats in c_rats(1,2,'ABCDEFG') loop
        dbms_output.put_line(r_rats.rate_id);
      end loop;   
    end;
    /Here I used rate_id = 1, service_id = 2 and orig_number = 'ABCDEF'.

  • If statement within a view is not working correctly ?

    Hi all,
    maybe i am wrong but i think the if statement within a view is not working correctly. See code down below.
    I would like to use the Hallo World depending on the page attribute isFrame with or without all the neccessary html tags. Therefore i have embedded the htmlb tags in an if statement. But for any reason if isframe is initial it isn't working. It would be great if anybody could help me.
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <% if not isframe is initial. %>
      <htmlb:content design="design2003">
         <htmlb:page title = "Top Level Navigation view">
    <% endif. %>
    hallo world
    <% if not isframe is initial. %>
         </htmlb:page>
      </htmlb:content>
    <% endif. %>
    thanks in advance and best regards
    Matthias Hlubek

    Matthias,
    The short answer: your example is <b>NOT</b> going to work. The long answer will probably 5 pages to describe. So first let me rewrite the example so that it could work, and then give a short version of the long answer. Do not be disappointed if it is not totally clear. It is rather complicated. (See the nice form of IF statements that are possible since 620.)
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <% if isframe is <b>NOT</b> initial. %>
    <htmlb:content design="design2003">
      <htmlb:page title = "Top Level Navigation view">
        hallo world
      </htmlb:page>
    </htmlb:content>
    <% else. %>
      hallo world
    <% endif. %>
    So why does your example not work? Let us start with a simple tag:
      <htmlb:page title = "Top Level Navigation view">
      </htmlb:page>
    Now, for each tag, we have effectively the opening part (<htmlb:page>), an optional body, and then the closing part (</htmlb:page>). We are now at the level of the BSP runtime processing one tag. What the runtime does not know, is whether the tag wants to process its body or not. Each tag can decide dynamically at runtime whether the body should be processed. So the BSP compiler generates the following code:
      DATA: tag TYPE REF TO cl_htmlb_page.
      CREATE OBJECT tag.
      tag->title = 'Top Level Navigation view'.
      IF tag->DO_AT_BEGINNING( ) = CONTINUE.
      ENDIF.
      tag->DO_AT_END( ).
    You should actually just debug your BSP code at ABAP level, and then you will immediately see all of this. Now, let us mix in your example with our code generation. First you simplified example:
    <% if isframe is NOT initial. %>
      <htmlb:page title = "Top Level Navigation view">
    <% endif. %>
    <% if isframe is NOT initial. %>
      </htmlb:page>
    <% endif. %>
    And then with our generated code. Look specifically at how the IF/ENDIF blocks suddenly match!
    if isframe is NOT initial.
      DATA: tag TYPE REF TO cl_htmlb_page.
      CREATE OBJECT tag.
      tag->title = 'Top Level Navigation view'.
      IF tag->DO_AT_BEGINNING( ) = CONTINUE.
    endif.
    if isframe is NOT initial.
      ENDIF.
      tag->DO_AT_END( ).
    endif.
    You can see that your ENDIF statements are closing IF blocks generated by the BSP compiler. Such a nesting will not work. This is a very short form of the problem, there are a number of variations, and different types of the same problem.
    The only way to solve this problem, is probably to put the body into a page fragment and include it like I did above with the duplicate HelloWorld strings. But this duplicates source code. Better is to put body onto a view, that can be processed as required.
    brian

  • HT201210 I backed up old phone to PC then did a sync to new 4S but when trying to update apps on phone it states - account not valid in Argentine store, must switch to U.S. store. I am in US and when I view account on PC it correctly shows me in US. Now w

    I backed up old phone to PC then did a sync to new 4S but when trying to update apps on phone it states - account not valid in Argentine store, must switch to U.S. store. I am in US and when I view account on PC it correctly shows me in US. Now what?

    log out and log back in again to store
    and if required
    http://support.apple.com/kb/HT1311

Maybe you are looking for

  • FireTreeNodesInserted doesn't work

    I am using TreeModel, not the DefaultTreeModel. When I insert a node, the first always works fine, but the following don't show up on the tree. I tried everything I could think of but doesn't. I have also noticed that the second insertion changes the

  • Record and display data

    What I would like to do is: display a data point every 1 sec but record the a data point every 10 sec. I have been playing with the event case and loops to achive these but no mather what I get one or the other; I either record and display every sec

  • App payed not works in full version

    I bought a full version of Sidexis iX for €54,99 two mounths ago. Yesterday I have reset my ipad and now this app asks to pay again for full version. I used the same account on itunes, I tried to install from backup, from the cloud... Nothing! It alw

  • Changing account for iPad

    My iCloud account will not accept my password

  • Compilation Error for userdisp.aspx page

    Any ideas what would cause this? Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Com