Basic Battery State Info - iPhone

Ive been looking (unsuccessfully) for basic power info exposed by the API. Not looking for anything like advanced power management (ala full blown IOKit) just simple readonly values for approx percentage battery remaining and if device is plugged in (on AC/DC) or not.
Any ideas?
In the event that such a thing does not exist (in actuality or via "published" APIs) and Apple Dev is monitoring this forum - Please, please, please give us basic power info.
We're wanting to be "good citizens" regarding power usage. Being able to selectivly scale back usage and use alt methods at different power levels is very important to deliver on that.
Something like (BOOL)[UIDevice currentDevice].isPluggedIn and (Float32)[UIDevice currentDevice].powerRemaining would open up a lot of doors for conditional power friendly apps.

have u posted this interesting feature request to bug reporter ?
it is probably the best place to do it

Similar Messages

  • I just got a brand new battery god my iPhone 4S at the apple support and it's still draining super fast

    I just got my battery on my iPhone 4S replaced at the apple store and it's a brand new battery and I've had the battery for less than a week and it's already starting to drain fast just like my old one. I've been out of state for a few days. I don't know if that's part of the issue or not. Please help!!

    In iTunes on your computer, select the Purchased section under STORE in the left column. Click on the first track and choose "Get Info" from the "File" menu.
    In the "Summary" tab you'll see details of the purchaser of the track. Click Next to go through all your purchased music one by one until you find the ones you need to get rid of.
    Unfortunately, there are no smart playlist rules that can filter tracks by the purchaser that I know of.

  • I purchased the Brookstone DLP projector for the iPhone, and all the reviews state the iPhone 4S can be mirrored with it. However, I can't not figure out how to do so. Is there a setting to change? Can't figure it out! ARGGG!

    I purchased the Brookstone DLP projector for the iPhone, and all the reviews state the iPhone 4S can be mirrored with it. However, I can't not figure out how to do so. Is there a setting to change? Can't figure it out! ARGGG!
    It will show pictures and videos if I choose, Start Slideshow, but it won't show anything else, no apps, etc.
    Here's a few examples of the reviews which state it mirrors:
    http://www.bgr.com/2011/11/07/brookstone-pocket-projector-for-iphone-4-and-4s-re view/
    http://www.gadgetaddict.info/brookstone-pocket-projector-for-iphone-4-and-4s-rev iew/
    I bought this for video analysis presentations with an app on the phone, so this is a key feature for me.
    Any help is appreciated.
    Jim

    I also have not figured out how to mirrow either.  I ask you both, is the sound via the projector louder than the phone itself when projector is tuerned off?  No matter what I do the max vilume through the projector speakers is lower that the phone itself even with phone remaining installed in projector.  I am think of taking it back to try another one.
    Keith

  • Battery state not present

    Hi everybody
    I have a Acer Aspire 5820TG TimelineX which is a really good laptop. But I have a big problem. I can't read the state of the battery.
    This is what I get from acpi -V,
    Battery 0: Unknown, 0%, rate information unavailable
    Battery 0: design capacity 4400 mAh, last full capacity 4400 mAh = 100%
    Adapter 0: on-line
    Thermal 0: ok, 40.0 degrees C
    Thermal 0: trip point 0 switches to mode critical at temperature 105.0 degrees C
    Thermal 0: trip point 1 switches to mode passive at temperature 98.0 degrees C
    Cooling 0: LCD 0 of 9
    Cooling 1: LCD 0 of 9
    Cooling 2: Processor 0 of 10
    Cooling 3: Processor 0 of 10
    Cooling 4: Processor 0 of 10
    Cooling 5: Processor 0 of 10
    from /proc/acpi/battery/BAT1/state
    present: yes
    design capacity: 4400 mAh
    last full capacity: 4400 mAh
    battery technology: rechargeable
    design voltage: 11100 mV
    design capacity warning: 300 mAh
    design capacity low: 132 mAh
    cycle count: 0
    capacity granularity 1: 32 mAh
    capacity granularity 2: 32 mAh
    model number: BAT1
    serial number: 11
    battery type: 11
    OEM info: 11
    As you can see, ACPI is well aware that the battery is present and its infomation
    Some output from dmesg | grep ACPI if it helps
    BIOS-e820: 00000000bb73b000 - 00000000bb7bf000 (ACPI NVS)
    BIOS-e820: 00000000bb7e1000 - 00000000bb7ff000 (ACPI data)
    modified: 00000000bb73b000 - 00000000bb7bf000 (ACPI NVS)
    modified: 00000000bb7e1000 - 00000000bb7ff000 (ACPI data)
    ACPI: RSDP 00000000000fe020 00024 (v02 ACRSYS)
    ACPI: XSDT 00000000bb7fe120 0007C (v01 ACRSYS ACRPRDCT 00000001 01000013)
    ACPI: FACP 00000000bb7fc000 000F4 (v04 ACRSYS ACRPRDCT 00000001 1025 01000013)
    ACPI: DSDT 00000000bb7ed000 0BA9D (v02 ACRSYS ACRPRDCT 00000001 1025 01000013)
    ACPI: FACS 00000000bb75f000 00040
    ACPI: ASF! 00000000bb7fd000 000A5 (v32 ACRSYS ACRPRDCT 00000001 1025 01000013)
    ACPI: HPET 00000000bb7fb000 00038 (v01 ACRSYS ACRPRDCT 00000001 1025 01000013)
    ACPI: APIC 00000000bb7fa000 0008C (v02 ACRSYS ACRPRDCT 00000001 1025 01000013)
    ACPI: MCFG 00000000bb7f9000 0003C (v01 ACRSYS ACRPRDCT 00000001 1025 01000013)
    ACPI: SLIC 00000000bb7ec000 00176 (v01 ACRSYS ACRPRDCT 00000001 1025 01000013)
    ACPI: BOOT 00000000bb7e9000 00028 (v01 ACRSYS ACRPRDCT 00000001 1025 01000013)
    ACPI: ASPT 00000000bb7e5000 00034 (v04 ACRSYS ACRPRDCT 00000001 1025 01000013)
    ACPI: WDAT 00000000bb7e4000 00224 (v01 ACRSYS ACRPRDCT 00000001 1025 01000013)
    ACPI: SSDT 00000000bb7e3000 009F1 (v01 PmRef CpuPm 00003000 INTL 20051117)
    ACPI: SSDT 00000000bb7e1000 01E0F (v01 AmdRef AmdTabl 00001000 INTL 20051117)
    ACPI: Local APIC address 0xfee00000
    ACPI: PM-Timer IO Port: 0x408
    ACPI: Local APIC address 0xfee00000
    ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
    ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
    ACPI: LAPIC (acpi_id[0x03] lapic_id[0x04] enabled)
    ACPI: LAPIC (acpi_id[0x04] lapic_id[0x05] enabled)
    ACPI: LAPIC (acpi_id[0x05] lapic_id[0x00] disabled)
    ACPI: LAPIC (acpi_id[0x06] lapic_id[0x00] disabled)
    ACPI: LAPIC (acpi_id[0x07] lapic_id[0x00] disabled)
    ACPI: LAPIC (acpi_id[0x08] lapic_id[0x00] disabled)
    ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
    ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
    ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
    ACPI: IRQ0 used by override.
    ACPI: IRQ2 used by override.
    ACPI: IRQ9 used by override.
    Using ACPI (MADT) for SMP configuration information
    ACPI: HPET id: 0x8086a201 base: 0xfed00000
    #6 [0000012000 - 0000016000] ACPI WAKEUP
    ACPI: Core revision 20100121
    ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
    ACPI: bus type pci registered
    ACPI: EC: Look up EC in DSDT
    ACPI: Executed 1 blocks of module-level executable AML code
    ACPI: BIOS _OSI(Linux) query ignored
    ACPI: SSDT 00000000bb691c18 003AE (v01 PmRef Cpu0Ist 00003000 INTL 20051117)
    ACPI: SSDT 00000000bb68f018 00891 (v01 PmRef Cpu0Cst 00003001 INTL 20051117)
    ACPI: SSDT 00000000bb690a98 00303 (v01 PmRef ApIst 00003000 INTL 20051117)
    ACPI: SSDT 00000000bb68ed98 00119 (v01 PmRef ApCst 00003000 INTL 20051117)
    ACPI: Interpreter enabled
    ACPI: (supports S0 S3 S4 S5)
    ACPI: Using IOAPIC for interrupt routing
    ACPI: EC: GPE = 0x16, I/O: command/status = 0x66, data = 0x62
    ACPI: No dock devices found.
    PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
    ACPI: PCI Root Bridge [PCI0] (0000:00)
    ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
    ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P2._PRT]
    ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P1._PRT]
    ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP01._PRT]
    ACPI: PCI Root Bridge [CPBG] (0000:7f)
    ACPI: PCI Interrupt Link [LNKA] (IRQs 1 3 4 5 6 *7 10 12 14 15)
    ACPI: PCI Interrupt Link [LNKB] (IRQs 1 3 4 *5 6 7 11 12 14 15)
    ACPI: PCI Interrupt Link [LNKC] (IRQs 1 3 4 5 6 7 10 12 14 15) *0, disabled.
    ACPI: PCI Interrupt Link [LNKD] (IRQs 1 3 4 5 6 7 11 12 14 15) *10
    ACPI: PCI Interrupt Link [LNKE] (IRQs 1 3 4 5 6 7 10 12 14 15) *0, disabled.
    ACPI: PCI Interrupt Link [LNKF] (IRQs 1 3 4 5 6 *7 11 12 14 15)
    ACPI: PCI Interrupt Link [LNKG] (IRQs 1 3 4 5 6 7 10 12 14 15) *11
    ACPI: PCI Interrupt Link [LNKH] (IRQs 1 3 4 5 6 7 *11 12 14 15)
    PCI: Using ACPI for IRQ routing
    pnp: PnP ACPI init
    ACPI: bus type pnp registered
    pnp: PnP ACPI: found 11 devices
    ACPI: ACPI bus type pnp unregistered
    pcieport 0000:00:01.0: Requesting control of PCIe PME from ACPI BIOS
    pcieport 0000:00:01.0: Failed to receive control of PCIe PME service: ACPI _OSC failed
    pcieport 0000:00:1c.0: Requesting control of PCIe PME from ACPI BIOS
    pcieport 0000:00:1c.0: Failed to receive control of PCIe PME service: ACPI _OSC failed
    pcieport 0000:00:1c.5: Requesting control of PCIe PME from ACPI BIOS
    pcieport 0000:00:1c.5: Failed to receive control of PCIe PME service: ACPI _OSC failed
    ACPI: resource 0000:00:1f.3 [io 0x4000-0x401f] conflicts with ACPI region SMBI [io 0x4000-0x400f 64bit pref disabled]
    ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
    ACPI: Power Button [PWRB]
    ACPI: Lid Switch [LID0]
    ACPI: Sleep Button [SLPB]
    ACPI: Power Button [PWRF]
    ACPI: Thermal Zone [_TZ] (40 C)
    ACPI: AC Adapter [ACAD] (on-line)
    ACPI: Battery Slot [BAT1] (battery present)
    ACPI: WMI: Mapper loaded
    ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no)
    [Firmware Bug]: ACPI(PEGP) defines _DOD but not _DOS
    ACPI: Video Device [PEGP] (multi-head: yes rom: no post: no)
    [Firmware Bug]: Duplicate ACPI video bus devices for the same VGA controller, please try module parameter "video.allow_duplicates=1"if the current driver doesn't work.
    I'm using the latest kernel from [testing] (2.6.34-ARCH).

    docwario wrote:you should try to update the bios with the latest one from acer (actually 1.13),
    battery state is now available
    I updated BIOS to v1.15 - still no solution. I have, however, found out why I can't see if the battery is charged or not. Appearantly, Acer is not using the standard ACPI spec. Just look at this:
    Intel ACPI Component Architecture
    ASL Optimizing Compiler version 20100121 [Feb 6 2010]
    Copyright (c) 2000 - 2010 Intel Corporation
    Supports ACPI Specification Revision 4.0
    dsdt.dsl 5231: Method (_Q0E, 0, NotSerialized)
    Warning 1088 - ^ Not all control paths return a value (_Q0E)
    dsdt.dsl 6596: Name (_T_0, Zero)
    Remark 5111 - Use of compiler reserved name ^ (_T_0)
    dsdt.dsl 6600: Name (_T_1, Zero)
    Remark 5111 - Use of compiler reserved name ^ (_T_1)
    dsdt.dsl 6659: Name (_T_0, Zero)
    Remark 5111 - Use of compiler reserved name ^ (_T_0)
    dsdt.dsl 6663: Name (_T_1, Zero)
    Remark 5111 - Use of compiler reserved name ^ (_T_1)
    dsdt.dsl 6831: Name (_T_0, Zero)
    Remark 5111 - Use of compiler reserved name ^ (_T_0)
    dsdt.dsl 6835: Name (_T_1, Zero)
    Remark 5111 - Use of compiler reserved name ^ (_T_1)
    dsdt.dsl 6894: Name (_T_0, Zero)
    Remark 5111 - Use of compiler reserved name ^ (_T_0)
    dsdt.dsl 6898: Name (_T_1, Zero)
    Remark 5111 - Use of compiler reserved name ^ (_T_1)
    dsdt.dsl 7777: Name (_T_0, Zero)
    Remark 5111 - ^ Use of compiler reserved name (_T_0)
    dsdt.dsl 7870: Name (_T_0, Zero)
    Remark 5111 - ^ Use of compiler reserved name (_T_0)
    dsdt.dsl 7874: Name (_T_1, Zero)
    Remark 5111 - Use of compiler reserved name ^ (_T_1)
    dsdt.dsl 7941: Name (_T_2, Zero)
    Remark 5111 - Use of compiler reserved name ^ (_T_2)
    dsdt.dsl 8008: Method (OEMN, 0, NotSerialized)
    Warning 1088 - ^ Not all control paths return a value (OEMN)
    dsdt.dsl 8105: Name (_T_0, Zero)
    Remark 5111 - ^ Use of compiler reserved name (_T_0)
    dsdt.dsl 9124: Name (_T_0, Zero)
    Remark 5111 - Use of compiler reserved name ^ (_T_0)
    dsdt.dsl 9152: Name (_T_1, Zero)
    Remark 5111 - Use of compiler reserved name ^ (_T_1)
    dsdt.dsl 9182: Name (_T_0, Zero)
    Remark 5111 - ^ Use of compiler reserved name (_T_0)
    dsdt.dsl 9248: Method (_WED, 1, NotSerialized)
    Warning 1088 - ^ Not all control paths return a value (_WED)
    dsdt.dsl 9248: Method (_WED, 1, NotSerialized)
    Warning 1081 - ^ Reserved method must return a value (_WED)
    dsdt.dsl 9254: Return (OEMN ())
    Warning 1093 - ^ Called method may not always return a value
    dsdt.dsl 9399: Method (WMBH, 3, NotSerialized)
    Warning 1088 - ^ Not all control paths return a value (WMBH)
    dsdt.dsl 9456: Method (WMBI, 3, NotSerialized)
    Warning 1088 - ^ Not all control paths return a value (WMBI)
    dsdt.dsl 9518: Method (WMBJ, 3, NotSerialized)
    Warning 1088 - ^ Not all control paths return a value (WMBJ)
    dsdt.dsl 9616: Name (_T_0, Zero)
    Remark 5111 - ^ Use of compiler reserved name (_T_0)
    dsdt.dsl 9661: Name (_T_0, Zero)
    Remark 5111 - ^ Use of compiler reserved name (_T_0)
    ASL Input: dsdt.dsl - 12143 lines, 396315 bytes, 5129 keywords
    AML Output: dsdt.aml - 47766 bytes, 1103 named objects, 4026 executable opcodes
    Compilation complete. 0 Errors, 8 Warnings, 18 Remarks, 6 Optimizations
    So I properly need to make a correct DSDT table to solve my problem. However, I can't make heads or tails in the ACPI spec document, and most infomation about such a issue is highly outdated.

  • 2610 signal & battery state not visible

    The display on my 2610 is difficult to see in bright light. I have set contrast to maximum and selected the basic theme to get black on white however the battery state and signal strength bars are still in light blue which is impossible to see in bright light. How do I change the colour of the bars to black?

    go to display settings and you can select diff colours
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • La batteria del mio iphone 4s non dura quando esce l aggiornamento a ios 5.2?

    avendo fatto l aggionamento a ios 5.1 i problemi della batteria del mio iphone 4s non si sono risolti, quando esce il prossimo aggiornamento? altrimenti cosa posso fare?

    Marzia, come ti capisco, ho il tuo stesso problema, ho comprato il 4s oltre 2 anni fa, pagato circa 700 euro, e ora per un difetto tenuto incubato fino a quest'ultimo aggiornamento che per me è stato solo un PEGGIORAMENTO, devo pagare???
    sinceramente questa apple mi ha deluso tantissimo......trallaltro, come immagino anche Te, ho perso un sacco di tempo cercondo notizie e info sul web facendo procedure con assistenza apple in linea e online......ho perso non solo ore.... GIORNI, ti giuro se avessi lavorato (come normalmente faccio da libero professionista molto impegnato) tutte quelle ore mi sarei comprato un 5S, invece no sai cosa mi propongono queste minchie dell'assistenza di chiedere la sostituzione pagando oltre 200 euro.......pensa se poi anche quello fosse difettoso o comparisse un altro difetto come quello della WIFI,  e loro continuassero a lavarsene le mani, e io avrei speso 900 euro ....in 2 anni
    MA DOVE VIVONO??????? CHE DELUSIONE
    Sai cosa Ti dico..... appena mi rompo le palle di metterlo in freezer lo demolisco e cambiero produttore ormai ci sono prodotti equivalenti.
    Che si mettano nostri panni questi grandi pensatori che decidono come bisogna rispodore ai clienti!!!
    Non è modo di comportarsi con i clienti!!!!!!
    Cosi li perdono i clienti e non solo me perche non gli faro una bella pubblicità!!!!!!
    per chi avesse dei dubbi il mio ID pratica: 591239036 dell'ultima pratica.

  • Possibile che la batteria del mio iphone 4s duri cosi poco!!...in 5 ore di standby consuma il 25% di carica!!

    possibile che la batteria del mio iphone 4s duri cosi poco!!...in 5 ore di standby consuma il 25% di carica!!

    Dopo qualche mese torno a scrivere degli aggiornamenti per chi in futuro avrà lo stesso problema.. Quindi, la situazione è migliorata con qualche settimana di utilizzo della nuova batteria (si sarà ricalibrato il sensore, non saprei), tuttavia non sono tornato alla condizione precedente il problema. non ci sono più stati spegnimenti a livelli superiori al 4/5%, questo mi fa pensare che, nonostante le rassicurazioni del centro assistenza, la batteria fosse ormai ko. Quello che continuo a notare è un calo drastico della batteria a qualsiasi livello di carica, ma questo credo sia imputabile più all'utilizzo di risorse dell'os.. Morale: attenzione a fare affidamento su ciò che dicono nei centri apple.. ps: nel mio caso ho preso la batteria sostitutiva a 30€, kit di apertura iphone e spedizione compresa, è un'operazione molto semplice..

  • Battery problem on iphone 4

    The problem with my iPhone 4 happened some weeks ago, I think after I upgrated to 4.3.5
    The phone automatically turns off when the battery states 20% remaining, and requires me to plug the charger on. When I plug the charger on, it turn on again and the battery still states 20%. Sometimes it automatically turns off at 40% of battery...
    I restored 2 times but the problem havent been solved. I just hope this is not a hardware problem... Just bought the phone in April in Singaprore but I dont stay there anymore.
    If you have the same problem and solved it well, please let me know how can I do to save my phone.
    Thank you!

    I get great life on my iPhone 4 with iOS 5.0.1 update, subject to the following steps:-
    turn off all mail push notifications, restrict to manual
    turn off all notifications except messages, missed calls and mail
    turn off all "other" app (FB, Twitter, etc) notifications (banner, badge, alerts)
    turn off location settings except what is reqd for Find my iPhone
    turn off iCloud
    Also ...
    if within wifi environment
              turn on wifi
              turn off cellular data (3G)
    else if not within wifi environment
              turn off wifi
              turn on cellular data (3G)
    else if not within wifi environment and data not required
              turn off wifi
              turn off cellular data (3G)
    The above was at 7.53 this morning. As of now, I have a Usage time of 5 hours and odd and Standby of 3 days and odd and my battery percentage is down to just 37%. This is including usage of Twitter, Facebook, Linked in, Mail and iCal two or three times since 7.53 ( 4 hours approx.)
    I realize that one shouldn't have to manually do all the things outlined above and I _have_ submitted a feedback form to Apple to try and program the iPhone so that it automatically does the above switches. I don't know if this is an idiotic suggestion but, until something happens, all the above works for me.
    RS

  • Battery vampire on iPhone 4 iOS 4.3.3

    After I use Google Maps I can watch the battery % drop like a rock. Only cure is to power cycle my iPhone 4 twice and than things go back to normal.
    Has anyone else seen this?
    \JonG

    The following was posted on Apple Discussions.
    On Mon Apr 04 12:32:43 MDT 2011, BCR(iPhone4) wrote:
    Subject: Battery Drainage on iPhone 4 (ios 4.3.1) Help Please
    Have 2 iPhone 4's (mine-32gb & wifes-16gb), both were running very well all the way till ios 4.2.1, until I updated both phones to ios 4.3, all different kind of problems started, the worst is battery drainage, wifi keeps flactuating between 2 and 3 bars,which ive never experianced before - even while being right next to the router.
    gsm signal keeps dropping and goes to search, ever so often, so did a complete factory reset as new phone, which didnt help, then waited till ios 4.3.1, which slightly improved the gsm, but wifi and battery drain is still problem, so did a complete reset as new phone in itunes on both phones, that had no effect at all, then went to Apple genius bar, they confirmed that the reset they do and the one we do at home is slightly different, so i gave the go ahead on both phones, they also asked me to discharge battery then put on charge, which i did, but the battery is still draining rapidly. I really have no idea whats going on. and I can confirm that there are no additional apps or any change to settings since I had the ios 4.2.1, I have also tried deleting mail switch off and re-appling the mail, also network reset, and both home and on/off switch reset, still having problems, basically I ve tried everything that have been suggested, including switching off ping. Is there any one having tried this and still having problems and if they have managed to sort it out, kindly share it with us, Ive noticed too many people are still having this issue, even though some are saying there is an improvement with ios 4.3.1. In my case its made it alot worse, please help, thanks
    Other related messages:
    http://discussions.apple.com/thread.jspa?messageID=13335924
    General access to Apple Discussions:
    http://discussions.apple.com

  • My battery on my iphone theree is growning and it turns off around 80% then in order for it to turn back on i need to put it on the charger , somebody please help me i need to fix this is there anyway  ican??

    my battery on my iphone three is growning and it turns off around 80% then in order for it to turn back on i need to put it on the charger , somebody please help me i need to fix this is there anyway  ican?

    Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new).  Try each of these in order until the issue is resolved.
    If the issue persists, then take the device to Apple for evaluation.
    FYI, Apple will not replace the battery without first doing basic troubleshooting or testing the battery.

  • OS 5 is the origin of battery problem not iPhone 4S

    The new version of OS 5.0.1 decrease in a very important way the duration of my battery of my iPhone 4. The problem comes from the OS 5 not iPhone 4S. Are you all right?

    The vast majority of apps cannot and do not run in the background.  For more info on Multitasking...
    http://support.apple.com/kb/ht4211
    http://whenwillapple.com/blog/2010/04/19/iphone-os-4-multitasking-explained-agai n/
    http://www.macworld.com/article/1164616/how_ios_multitasking_really_works.html
    http://speirs.org/blog/2012/1/2/misconceptions-about-ios-multitasking.html

  • Basic if statement in formcalc..

    I'm trying to create basic if statement for one of the fields. I'd like to know your opinion what is wrong with it
    //code
    form1.#subform[0].Body.TotalTaken[0]::calculate -  (FormCalc, client)
    var sum = Sum(Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec)
    // if I leave only Sum(Jan,...) in this field it works fine, shows the sum...
    if (this.rawValue > 0 && TotalAvailable.rawValue <= sum)
      this.rawValue = sum
    else
        this.rawValue = 1
    endif
    //endofcode
    Im trying to do basic validation, if sum is between 0 and Total Available number then its ok, display the sum, other wise dosplay some popup, at the moment I want only "1" to be shown since I cant pass even that basic scripts.
    I get an error "near token &". It doesnt matter if I switch "this" with field name, "TotalAvailable". All fields are numeric of same type.
    Please advice.

    Sum() works fine, Jan, Feb etc are names of NumericFields.
    I have holidays chart where user puts overall number of days available for him as free from work in field named "TotalAvailable"
    in fields named after each month, Jan, Feb etc.. user puts how many days he will use for holidays in given month
    In "TotalTaken" field I add all the days user took in any of given months.
    With that if statement I want to check if Sum(..) is not bigger than TotalAvailable number, if is bigger then error (or just "1" for now as I have to much troubles with simpler tasks)
    Ill try to use your tips and see what comes of it, thank you. Still any advice will be helpfull.
    Best regards

  • Reception / Battery problems with iPhone 3GS after upgrading to iOS 4.2.1

    There are major reception and battery problems with iPhone 3GS after upgrading to iOS 4.2.1.
    I can not believe that Apple did not test this for major bugs like this one is.
    I am a business user and can not effort to have bad reception. Apple wants to gain in the business clients... I never had this with my former BlackBerrys!
    I need a reliable phone not a play thing like this is right now, it just needs it to work propely. And if a major bug like this comes along, fix it immediately. After the iPhone4 story, now this...incredible! Going back to my reliable BlackBerry! It just ain't reliable and takes forever to fix a problem.

    I have the same issue after iOS 4.2.1 update. I am using iPhone 3GS officially unlocked by Apple. I tried using different SIM cards and both carriers show same problem when using phone in 3G mode. Phone falls back to EDGE mode showing 'E' from '3G' at start. I have reset the phone and rebooted several times and moved to different cell areas in the city just to verify the problem.
    I had no such issues earlier. I also have Nokia E71 which shows full signal and has no such issues.
    I have posted the bug on apple iphone feedback page. I hope they Apple will fix the problem and test the release properly on all models before releasing to public.

  • I just installed the Lion operating system, basically to upgrade my iPhone. I didn't realize that my Microsoft Office 2004 application would no longer work. I have been using Word for my writing and I receive most of my emails with Word attachments. I hav

    I just installed the Lion operating system, basically to upgrade my iPhone. I didn't realize that my Microsoft Office 2004 application would no longer work. I have been using Word for my writing and I receive most of my emails with Word attachments. I have been using Apple products for years, always touting their reliability and customer service. I am not a techie, I just want to be able to do what I do on the computer and Apple always fulfilled my needs. Now I am told because of some operating system gobbledygook, I have to go out and purchase new software to use Word. This is despicable. I see no particular benefit to using Lion, but I do see a lot of detriments. Apple now seems to have turned into Microsoft, making software obsolete so they can make more money and to **** with the customer. You can be sure that my next computer will be a PC. I have completely lost confidence in Apple.

    I seem to never tire of saying this. It was for Apple when they first announced 10.7 to disclose this. Yes, it was widely reported -- or rather, rumored -- but not by Apple. And many people who have gotten caught by this assumed that Apple itself would have told them beforehand about the loss of this very important feature which they had come to rely on. As far as I know, not even in fine print, does this appear anywhere on the Lion announcement or any of its links.
    I am not saying Apple had to continue Rosetta in Lion, or forever, just that if it was going to be dropped, it should have been made known.
    As relative "insiders" we should not forget that many people don't have the time, habit or interest to do this kind of research. I think it is a breach of trust that Apple has never directly made this announcement or given people the opportunity to decide beforehand if giving up their PPC apps for a new OS is a worthwhile tradeoff.

  • Battery charge info in status bar is incorrect!  HELP!

    This issue started a day or two ago and at first I thought it was no big deal, but it's actually quite a problem! I've got a 15.4" Macbook Pro that I bought in May, and have never had any problems up until this point. But then I noticed that the icon in the status bar where it says the percentage of battery charge and says whether it's running off battery or it's plugged in - it's WRONG. It's stuck at 99% and says it's plugged in. All the time. Even when it's almost dead and not plugged in. So I can't tell how much battery charge it has left. In all of the places where you can view info about the battery, the info is wrong - it says it's fully charged, that I have a long time left, etc. but it's not true. So now it can completely out of batteries and shut down and I won't be able to tell that it's running low.
    Has anyone had this problem? What do I do? Is this a software or a hardware issue? HELP!

    Have you tried resetting the PRAM ?
    http://docs.info.apple.com/article.html?artnum=14449

Maybe you are looking for

  • How to make Account managers owners of Accounts through Account teams

    Hi, I've got a question regarding loading data. In my organisation only the admin can load new accounts. Account managers however are responsible of the accounts after the initial load. I want to use the account team funtionality (and not add an 'own

  • IPhoto Slideshow exported to iDVD

    I just created a slideshow in iPhoto, then sent it to iDVD. It indicated that it was sending all images to iDVD (took a long time sending it and I could see the progess). iDVD launched, and I can't find the imported slideshow.

  • USB audio interface

    Hey guys, I have a USB audio interface and I'm not sure how to get it working on Arch. It actually randomly started working one day when my sound settings in gnome started to show more than just "Digital Output (S/PDIF) - Built-in Audio" for possible

  • SAP IS Retail - Table for Merchandise Hierarchy, Merc Hierarchy assignments

    HI, I am looking for table details where (1) Merchandise Hierarchy, (2) Merchandise Hierarchy assignments and (3) Merchandise Hierarchy to Merchandise Category assignment will be stored. Regards

  • Composite key duplicate values

    Hi All, I have a following query select a,b,c_num,d,e,f,g,h,i_name, max(l_num) "xxx", from table group by a,b,c_num, d, e, f, g,h,i_name; Here, c_num and l_num are in composite primary key. i_name can change for each l_num. so this query is listing m