check for Existing record - InfoPath Dev
in

InfoPath Dev

check for Existing record

Last post 06-05-2014 01:25 AM by donstephen. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-31-2014 01:26 PM

    check for Existing record

    hello I'm new to Infopath VSTA, and I have this scenario, I have an Infopath 2010 filler form that is connected to MS Access 2010 database. I need to check when user entering a new request in the form, the combination of the ID number and with some of the request types can't be repeated in one year period,, I really appreciate your help,,
  • 06-05-2014 01:25 AM In reply to

    Re: check for Existing record

    Hi hani232,

    To check if a record exists would require you to query your data base using the ID number. Now, if your query returns an item, you could use a condition:

    Number of occurrences of (repeating group) is greater than 1

    If the query returns an item, then it means that the item is existing. From here you can set action rules triggered by this condition.




    As for the one year period, you could use a formula such as substring(today(), 1, 4) to give you the current year. Or if you wish to be more specific, you may need to use a Modified date column and use this as a basis for comparison. You may use a formula or a condition such as Modified  < addDays(today(), -365). 

    Let's say for example that the Modified date is 2013-01-15, the addDays formula will return the date a year ago (today minus 365). If the formula is greater than the Modified date, then then rule should run, you can then use this as your conditional basis for setting values.

    I hope this makes sense.

    Regards,

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.