Got Success in ...

Discussion in 'Free Source Codes' started by Jay kumar tailor, Dec 6, 2018.

    
  1. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    Dear all

    Recently I Got Success in Getting StateName From Statecode.
    While Importing Masters/vouchers.

    see this Funny/Long Code.

    Cause Statename Parsing Is failed In My Code So I Change My Way To This Funny Thing.

    30a : If : NOT $$IsEmpty:($$FileReadCell:##RowIndex:18)
    31 : Set : LFGststatecode : $$Stringpart:($$FileReadCell:##RowIndex:18):0:2
    ;32 : Msg Box : $$LoopIndex :##LFGststatecode
    32a : Do If : ##LFGststatecode = "35" : Set value : Statename : "Andaman & Nicobar Islands"
    32b : Do If : ##LFGststatecode = "37" : Set value : Statename : "Andhra Pradesh"
    32c : Do If : ##LFGststatecode = "12" : Set value : Statename : "Arunachal Pradesh"
    32d : Do If : ##LFGststatecode = "18" : Set value : Statename : "Assam"
    32e : Do If : ##LFGststatecode = "10" : Set value : Statename : "Bihar"
    32f : Do If : ##LFGststatecode = "04" : Set value : Statename : "Chandigarh"
    32g : Do If : ##LFGststatecode = "22" : Set value : Statename : "Chhattisgarh"
    32h : Do If : ##LFGststatecode = "26" : Set value : Statename : "Dadra & Nagar Haveli"
    32i : Do If : ##LFGststatecode = "25" : Set value : Statename : "Daman & Diu"
    32j : Do If : ##LFGststatecode = "07" : Set value : Statename : "Delhi"
    32k : Do If : ##LFGststatecode = "30" : Set value : Statename : "Goa"
    32l : Do If : ##LFGststatecode = "24" : Set value : Statename : "Gujarat"
    32m : Do If : ##LFGststatecode = "06" : Set value : Statename : "Haryana"
    32n : Do If : ##LFGststatecode = "02" : Set value : Statename : "Himachal Pradesh"
    32o : Do If : ##LFGststatecode = "01" : Set value : Statename : "Jammu & Kashmir"
    32p : Do If : ##LFGststatecode = "20" : Set value : Statename : "Jharkhand"
    32q : Do If : ##LFGststatecode = "29" : Set value : Statename : "Karnataka"
    32r : Do If : ##LFGststatecode = "32" : Set value : Statename : "Kerala"
    32s : Do If : ##LFGststatecode = "31" : Set value : Statename : "Lakshadweep"
    32t : Do If : ##LFGststatecode = "23" : Set value : Statename : "Madhya Pradesh"
    32u : Do If : ##LFGststatecode = "27" : Set value : Statename : "Maharashtra"
    32v : Do If : ##LFGststatecode = "14" : Set value : Statename : "Manipur"
    32w : Do If : ##LFGststatecode = "17" : Set value : Statename : "Meghalaya"
    32x : Do If : ##LFGststatecode = "15" : Set value : Statename : "Mizoram"
    32y : Do If : ##LFGststatecode = "13" : Set value : Statename : "Nagaland"
    32z : Do If : ##LFGststatecode = "21" : Set value : Statename : "Odisha"
    33a : Do If : ##LFGststatecode = "34" : Set value : Statename : "Puducherry"
    33b : Do If : ##LFGststatecode = "03" : Set value : Statename : "Punjab"
    33c : Do If : ##LFGststatecode = "08" : Set value : Statename : "Rajasthan"
    33d : Do If : ##LFGststatecode = "11" : Set value : Statename : "Sikkim"
    33e : Do If : ##LFGststatecode = "33" : Set value : Statename : "Tamil Nadu"
    33f : Do If : ##LFGststatecode = "36" : Set value : Statename : "Telangana"
    33g : Do If : ##LFGststatecode = "16" : Set value : Statename : "Tripura"
    33h : Do If : ##LFGststatecode = "05" : Set value : Statename : "Uttarakhand"
    33i : Do If : ##LFGststatecode = "09" : Set value : Statename : "Uttar Pradesh"
    33j : Do If : ##LFGststatecode = "19" : Set value : Statename : "West Bengal"
    33k : Do If : ##LFGststatecode = "97" : Set value : Statename : $$SysName:GSTOtherTerritory
    33l : End If
     


  2. Lynch

    Lynch Member


    Lol... these kinda weird ideas, will come at this time only..... have a good sleep and try in the morning, the parsing error would be solved by changin a small part of the code.....

    this was the case most of time happened to me..... :D :D :D
     


  3. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    new error

    33f : Do If : ##LFGststatecode = "36" : Set value : Statename : $$SysName:Telangana

    State Telangana Does not Exist
     


Share This Page