문제

I have a form for my custom SharePoint List that, and I need to make a date field 'read-only' after someone goes in and fills in the date.

What is the best way to do to this via InfoPath?

도움이 되었습니까?

해결책

Use Formatting rule.

If the date field is not blank and it has valid value, disable this field control (make it read-only).

In the InfoPath form, the date value always in this format:
yyyy-mm-ddThh:mm:ss
(e.g. 2019-03-05T00:00:00-07:00 or 2001-03-05T00:00:00)

Using the following pattern to check if the date value is valid:

((([0-9][0-9])|([1-2][0-9][0-9][0-9]))-(([1-9])|(0[1-9])|(1[0-2]))-(([0-9])|([0-2][0-9])|(3[0-1]))T00:00:00)|((([0-9][0-9])|([1-2][0-9][0-9][0-9]))-(([1-9])|(0[1-9])|(1[0-2]))-(([0-9])|([0-2][0-9])|(3[0-1]))T00:00:00-0([0-9]):00)

Use the rule:

enter image description here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top